blob: faca1ab344d2069399e7c50cf657c8090cb0dcbe [file] [log] [blame]
Bryan Wu1394f032007-05-06 14:50:22 -07001/*
2 * File: arch/blackfin/mach-common/cplbmgtr.S
3 * Based on:
4 * Author: LG Soft India
5 *
6 * Created: ?
7 * Description: CPLB replacement routine for CPLB mismatch
8 *
9 * Modified:
10 * Copyright 2004-2006 Analog Devices Inc.
11 *
12 * Bugs: Enter bugs at http://blackfin.uclinux.org/
13 *
14 * This program is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation; either version 2 of the License, or
17 * (at your option) any later version.
18 *
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
23 *
24 * You should have received a copy of the GNU General Public License
25 * along with this program; if not, see the file COPYING, or write
26 * to the Free Software Foundation, Inc.,
27 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
28 */
29
30/* Usage: int _cplb_mgr(is_data_miss,int enable_cache)
31 * is_data_miss==2 => Mark as Dirty, write to the clean data page
32 * is_data_miss==1 => Replace a data CPLB.
33 * is_data_miss==0 => Replace an instruction CPLB.
34 *
35 * Returns:
36 * CPLB_RELOADED => Successfully updated CPLB table.
37 * CPLB_NO_UNLOCKED => All CPLBs are locked, so cannot be evicted.
38 * This indicates that the CPLBs in the configuration
39 * tablei are badly configured, as this should never
40 * occur.
41 * CPLB_NO_ADDR_MATCH => The address being accessed, that triggered the
42 * exception, is not covered by any of the CPLBs in
43 * the configuration table. The application is
44 * presumably misbehaving.
45 * CPLB_PROT_VIOL => The address being accessed, that triggered the
46 * exception, was not a first-write to a clean Write
47 * Back Data page, and so presumably is a genuine
48 * violation of the page's protection attributes.
49 * The application is misbehaving.
50 */
51
52#include <linux/linkage.h>
53#include <asm/blackfin.h>
54#include <asm/cplb.h>
55
56#ifdef CONFIG_EXCPT_IRQ_SYSC_L1
57.section .l1.text
58#else
59.text
60#endif
61
62.align 2;
63ENTRY(_cplb_mgr)
64
65 [--SP]=( R7:4,P5:3 );
66
67 CC = R0 == 2;
68 IF CC JUMP .Ldcplb_write;
69
70 CC = R0 == 0;
71 IF !CC JUMP .Ldcplb_miss_compare;
72
73 /* ICPLB Miss Exception. We need to choose one of the
74 * currently-installed CPLBs, and replace it with one
75 * from the configuration table.
Robin Getz6a3f0b42007-11-15 15:10:48 +080076 */
Bryan Wu1394f032007-05-06 14:50:22 -070077
Robin Getzf53e8672008-01-27 15:38:44 +080078 /* A multi-word instruction can cross a page boundary. This means the
79 * first part of the instruction can be in a valid page, but the
80 * second part is not, and hence generates the instruction miss.
81 * However, the fault address is for the start of the instruction,
82 * not the part that's in the bad page. Therefore, we have to check
83 * whether the fault address applies to a page that is already present
84 * in the table.
85 */
86
Mike Frysingere208f832007-07-25 10:11:42 +080087 P4.L = LO(ICPLB_FAULT_ADDR);
88 P4.H = HI(ICPLB_FAULT_ADDR);
Bryan Wu1394f032007-05-06 14:50:22 -070089
90 P1 = 16;
91 P5.L = _page_size_table;
92 P5.H = _page_size_table;
93
Mike Frysingere208f832007-07-25 10:11:42 +080094 P0.L = LO(ICPLB_DATA0);
95 P0.H = HI(ICPLB_DATA0);
Bryan Wu1394f032007-05-06 14:50:22 -070096 R4 = [P4]; /* Get faulting address*/
97 R6 = 64; /* Advance past the fault address, which*/
98 R6 = R6 + R4; /* we'll use if we find a match*/
Robin Getzf53e8672008-01-27 15:38:44 +080099 R3 = ((16 << 8) | 2); /* Extract mask, two bits at posn 16 */
Bryan Wu1394f032007-05-06 14:50:22 -0700100
101 R5 = 0;
102.Lisearch:
103
104 R1 = [P0-0x100]; /* Address for this CPLB */
105
106 R0 = [P0++]; /* Info for this CPLB*/
107 CC = BITTST(R0,0); /* Is the CPLB valid?*/
108 IF !CC JUMP .Lnomatch; /* Skip it, if not.*/
109 CC = R4 < R1(IU); /* If fault address less than page start*/
110 IF CC JUMP .Lnomatch; /* then skip this one.*/
111 R2 = EXTRACT(R0,R3.L) (Z); /* Get page size*/
112 P1 = R2;
113 P1 = P5 + (P1<<2); /* index into page-size table*/
114 R2 = [P1]; /* Get the page size*/
115 R1 = R1 + R2; /* and add to page start, to get page end*/
116 CC = R4 < R1(IU); /* and see whether fault addr is in page.*/
117 IF !CC R4 = R6; /* If so, advance the address and finish loop.*/
118 IF !CC JUMP .Lisearch_done;
119.Lnomatch:
120 /* Go around again*/
121 R5 += 1;
122 CC = BITTST(R5, 4); /* i.e CC = R5 >= 16*/
123 IF !CC JUMP .Lisearch;
124
125.Lisearch_done:
126 I0 = R4; /* Fault address we'll search for*/
127
128 /* set up pointers */
Mike Frysingere208f832007-07-25 10:11:42 +0800129 P0.L = LO(ICPLB_DATA0);
130 P0.H = HI(ICPLB_DATA0);
Bryan Wu1394f032007-05-06 14:50:22 -0700131
132 /* The replacement procedure for ICPLBs */
133
Mike Frysingere208f832007-07-25 10:11:42 +0800134 P4.L = LO(IMEM_CONTROL);
135 P4.H = HI(IMEM_CONTROL);
Bryan Wu1394f032007-05-06 14:50:22 -0700136
Robin Getzf53e8672008-01-27 15:38:44 +0800137 /* Turn off CPLBs while we work, necessary according to HRM before
138 * modifying CPLB descriptors
139 */
Bryan Wu1394f032007-05-06 14:50:22 -0700140 R5 = [P4]; /* Control Register*/
141 BITCLR(R5,ENICPLB_P);
142 CLI R1;
143 SSYNC; /* SSYNC required before writing to IMEM_CONTROL. */
144 .align 8;
145 [P4] = R5;
146 SSYNC;
147 STI R1;
148
149 R1 = -1; /* end point comparison */
150 R3 = 16; /* counter */
151
152 /* Search through CPLBs for first non-locked entry */
153 /* Overwrite it by moving everyone else up by 1 */
154.Licheck_lock:
155 R0 = [P0++];
156 R3 = R3 + R1;
157 CC = R3 == R1;
158 IF CC JUMP .Lall_locked;
159 CC = BITTST(R0, 0); /* an invalid entry is good */
160 IF !CC JUMP .Lifound_victim;
161 CC = BITTST(R0,1); /* but a locked entry isn't */
162 IF CC JUMP .Licheck_lock;
163
164.Lifound_victim:
165#ifdef CONFIG_CPLB_INFO
166 R7 = [P0 - 0x104];
167 P2.L = _ipdt_table;
168 P2.H = _ipdt_table;
169 P3.L = _ipdt_swapcount_table;
170 P3.H = _ipdt_swapcount_table;
171 P3 += -4;
172.Licount:
173 R2 = [P2]; /* address from config table */
174 P2 += 8;
175 P3 += 8;
176 CC = R2==-1;
177 IF CC JUMP .Licount_done;
178 CC = R7==R2;
179 IF !CC JUMP .Licount;
180 R7 = [P3];
181 R7 += 1;
182 [P3] = R7;
183 CSYNC;
184.Licount_done:
185#endif
186 LC0=R3;
187 LSETUP(.Lis_move,.Lie_move) LC0;
188.Lis_move:
189 R0 = [P0];
190 [P0 - 4] = R0;
191 R0 = [P0 - 0x100];
192 [P0-0x104] = R0;
193.Lie_move:P0+=4;
194
195 /* We've made space in the ICPLB table, so that ICPLB15
196 * is now free to be overwritten. Next, we have to determine
197 * which CPLB we need to install, from the configuration
198 * table. This is a matter of getting the start-of-page
199 * addresses and page-lengths from the config table, and
200 * determining whether the fault address falls within that
201 * range.
202 */
203
204 P2.L = _ipdt_table;
205 P2.H = _ipdt_table;
206#ifdef CONFIG_CPLB_INFO
207 P3.L = _ipdt_swapcount_table;
208 P3.H = _ipdt_swapcount_table;
209 P3 += -8;
210#endif
211 P0.L = _page_size_table;
212 P0.H = _page_size_table;
213
214 /* Retrieve our fault address (which may have been advanced
215 * because the faulting instruction crossed a page boundary).
216 */
217
218 R0 = I0;
219
220 /* An extraction pattern, to get the page-size bits from
221 * the CPLB data entry. Bits 16-17, so two bits at posn 16.
222 */
223
224 R1 = ((16<<8)|2);
225.Linext: R4 = [P2++]; /* address from config table */
226 R2 = [P2++]; /* data from config table */
227#ifdef CONFIG_CPLB_INFO
228 P3 += 8;
229#endif
230
231 CC = R4 == -1; /* End of config table*/
232 IF CC JUMP .Lno_page_in_table;
233
234 /* See if failed address > start address */
235 CC = R4 <= R0(IU);
Robin Getz6a3f0b42007-11-15 15:10:48 +0800236 IF !CC JUMP .Linext;
Bryan Wu1394f032007-05-06 14:50:22 -0700237
238 /* extract page size (17:16)*/
239 R3 = EXTRACT(R2, R1.L) (Z);
240
241 /* add page size to addr to get range */
242
243 P5 = R3;
244 P5 = P0 + (P5 << 2); /* scaled, for int access*/
245 R3 = [P5];
246 R3 = R3 + R4;
247
248 /* See if failed address < (start address + page size) */
249 CC = R0 < R3(IU);
250 IF !CC JUMP .Linext;
251
252 /* We've found a CPLB in the config table that covers
253 * the faulting address, so install this CPLB into the
254 * last entry of the table.
255 */
256
Mike Frysingere208f832007-07-25 10:11:42 +0800257 P1.L = LO(ICPLB_DATA15); /* ICPLB_DATA15 */
258 P1.H = HI(ICPLB_DATA15);
Bryan Wu1394f032007-05-06 14:50:22 -0700259 [P1] = R2;
260 [P1-0x100] = R4;
261#ifdef CONFIG_CPLB_INFO
262 R3 = [P3];
263 R3 += 1;
264 [P3] = R3;
265#endif
266
267 /* P4 points to IMEM_CONTROL, and R5 contains its old
268 * value, after we disabled ICPLBS. Re-enable them.
269 */
270
271 BITSET(R5,ENICPLB_P);
272 CLI R2;
273 SSYNC; /* SSYNC required before writing to IMEM_CONTROL. */
274 .align 8;
275 [P4] = R5;
276 SSYNC;
277 STI R2;
278
279 ( R7:4,P5:3 ) = [SP++];
280 R0 = CPLB_RELOADED;
281 RTS;
282
283/* FAILED CASES*/
284.Lno_page_in_table:
Bryan Wu1394f032007-05-06 14:50:22 -0700285 R0 = CPLB_NO_ADDR_MATCH;
Robin Getz6a3f0b42007-11-15 15:10:48 +0800286 JUMP .Lfail_ret;
287
Bryan Wu1394f032007-05-06 14:50:22 -0700288.Lall_locked:
Bryan Wu1394f032007-05-06 14:50:22 -0700289 R0 = CPLB_NO_UNLOCKED;
Robin Getz6a3f0b42007-11-15 15:10:48 +0800290 JUMP .Lfail_ret;
291
Bryan Wu1394f032007-05-06 14:50:22 -0700292.Lprot_violation:
Bryan Wu1394f032007-05-06 14:50:22 -0700293 R0 = CPLB_PROT_VIOL;
Robin Getz6a3f0b42007-11-15 15:10:48 +0800294
295.Lfail_ret:
296 /* Make sure we turn protection/cache back on, even in the failing case */
297 BITSET(R5,ENICPLB_P);
298 CLI R2;
299 SSYNC; /* SSYNC required before writing to IMEM_CONTROL. */
300 .align 8;
301 [P4] = R5;
302 SSYNC;
303 STI R2;
304
305 ( R7:4,P5:3 ) = [SP++];
Bryan Wu1394f032007-05-06 14:50:22 -0700306 RTS;
307
308.Ldcplb_write:
309
310 /* if a DCPLB is marked as write-back (CPLB_WT==0), and
311 * it is clean (CPLB_DIRTY==0), then a write to the
312 * CPLB's page triggers a protection violation. We have to
313 * mark the CPLB as dirty, to indicate that there are
314 * pending writes associated with the CPLB.
315 */
316
Mike Frysingere208f832007-07-25 10:11:42 +0800317 P4.L = LO(DCPLB_STATUS);
318 P4.H = HI(DCPLB_STATUS);
319 P3.L = LO(DCPLB_DATA0);
320 P3.H = HI(DCPLB_DATA0);
Bryan Wu1394f032007-05-06 14:50:22 -0700321 R5 = [P4];
322
323 /* A protection violation can be caused by more than just writes
324 * to a clean WB page, so we have to ensure that:
325 * - It's a write
326 * - to a clean WB page
327 * - and is allowed in the mode the access occurred.
328 */
329
330 CC = BITTST(R5, 16); /* ensure it was a write*/
331 IF !CC JUMP .Lprot_violation;
332
333 /* to check the rest, we have to retrieve the DCPLB.*/
334
335 /* The low half of DCPLB_STATUS is a bit mask*/
336
337 R2 = R5.L (Z); /* indicating which CPLB triggered the event.*/
338 R3 = 30; /* so we can use this to determine the offset*/
339 R2.L = SIGNBITS R2;
340 R2 = R2.L (Z); /* into the DCPLB table.*/
341 R3 = R3 - R2;
342 P4 = R3;
343 P3 = P3 + (P4<<2);
344 R3 = [P3]; /* Retrieve the CPLB*/
345
346 /* Now we can check whether it's a clean WB page*/
347
348 CC = BITTST(R3, 14); /* 0==WB, 1==WT*/
349 IF CC JUMP .Lprot_violation;
350 CC = BITTST(R3, 7); /* 0 == clean, 1 == dirty*/
351 IF CC JUMP .Lprot_violation;
352
353 /* Check whether the write is allowed in the mode that was active.*/
354
355 R2 = 1<<3; /* checking write in user mode*/
356 CC = BITTST(R5, 17); /* 0==was user, 1==was super*/
357 R5 = CC;
358 R2 <<= R5; /* if was super, check write in super mode*/
359 R2 = R3 & R2;
360 CC = R2 == 0;
361 IF CC JUMP .Lprot_violation;
362
363 /* It's a genuine write-to-clean-page.*/
364
365 BITSET(R3, 7); /* mark as dirty*/
366 [P3] = R3; /* and write back.*/
367 NOP;
368 CSYNC;
369 ( R7:4,P5:3 ) = [SP++];
370 R0 = CPLB_RELOADED;
371 RTS;
372
373.Ldcplb_miss_compare:
374
375 /* Data CPLB Miss event. We need to choose a CPLB to
376 * evict, and then locate a new CPLB to install from the
377 * config table, that covers the faulting address.
378 */
379
Mike Frysingere208f832007-07-25 10:11:42 +0800380 P1.L = LO(DCPLB_DATA15);
381 P1.H = HI(DCPLB_DATA15);
Bryan Wu1394f032007-05-06 14:50:22 -0700382
Mike Frysingere208f832007-07-25 10:11:42 +0800383 P4.L = LO(DCPLB_FAULT_ADDR);
384 P4.H = HI(DCPLB_FAULT_ADDR);
Bryan Wu1394f032007-05-06 14:50:22 -0700385 R4 = [P4];
386 I0 = R4;
387
388 /* The replacement procedure for DCPLBs*/
389
390 R6 = R1; /* Save for later*/
391
392 /* Turn off CPLBs while we work.*/
Mike Frysingere208f832007-07-25 10:11:42 +0800393 P4.L = LO(DMEM_CONTROL);
394 P4.H = HI(DMEM_CONTROL);
Bryan Wu1394f032007-05-06 14:50:22 -0700395 R5 = [P4];
396 BITCLR(R5,ENDCPLB_P);
397 CLI R0;
398 SSYNC; /* SSYNC required before writing to DMEM_CONTROL. */
399 .align 8;
400 [P4] = R5;
401 SSYNC;
402 STI R0;
403
404 /* Start looking for a CPLB to evict. Our order of preference
405 * is: invalid CPLBs, clean CPLBs, dirty CPLBs. Locked CPLBs
406 * are no good.
407 */
408
Mike Frysingere208f832007-07-25 10:11:42 +0800409 I1.L = LO(DCPLB_DATA0);
410 I1.H = HI(DCPLB_DATA0);
Bryan Wu1394f032007-05-06 14:50:22 -0700411 P1 = 2;
412 P2 = 16;
413 I2.L = _dcplb_preference;
414 I2.H = _dcplb_preference;
415 LSETUP(.Lsdsearch1, .Ledsearch1) LC0 = P1;
416.Lsdsearch1:
417 R0 = [I2++]; /* Get the bits we're interested in*/
418 P0 = I1; /* Go back to start of table*/
419 LSETUP (.Lsdsearch2, .Ledsearch2) LC1 = P2;
420.Lsdsearch2:
421 R1 = [P0++]; /* Fetch each installed CPLB in turn*/
422 R2 = R1 & R0; /* and test for interesting bits.*/
423 CC = R2 == 0; /* If none are set, it'll do.*/
424 IF !CC JUMP .Lskip_stack_check;
425
426 R2 = [P0 - 0x104]; /* R2 - PageStart */
427 P3.L = _page_size_table; /* retrieve end address */
428 P3.H = _page_size_table; /* retrieve end address */
429 R3 = 0x1002; /* 16th - position, 2 bits -length */
Mike Frysinger1aafd902007-07-25 11:19:14 +0800430#if ANOMALY_05000209
Bryan Wu1394f032007-05-06 14:50:22 -0700431 nop; /* Anomaly 05000209 */
432#endif
433 R7 = EXTRACT(R1,R3.l);
434 R7 = R7 << 2; /* Page size index offset */
435 P5 = R7;
436 P3 = P3 + P5;
437 R7 = [P3]; /* page size in bytes */
438
439 R7 = R2 + R7; /* R7 - PageEnd */
440 R4 = SP; /* Test SP is in range */
441
442 CC = R7 < R4; /* if PageEnd < SP */
443 IF CC JUMP .Ldfound_victim;
444 R3 = 0x284; /* stack length from start of trap till
445 * the point.
446 * 20 stack locations for future modifications
447 */
448 R4 = R4 + R3;
449 CC = R4 < R2; /* if SP + stacklen < PageStart */
450 IF CC JUMP .Ldfound_victim;
451.Lskip_stack_check:
452
453.Ledsearch2: NOP;
454.Ledsearch1: NOP;
455
456 /* If we got here, we didn't find a DCPLB we considered
457 * replacable, which means all of them were locked.
458 */
459
460 JUMP .Lall_locked;
461.Ldfound_victim:
462
463#ifdef CONFIG_CPLB_INFO
464 R7 = [P0 - 0x104];
465 P2.L = _dpdt_table;
466 P2.H = _dpdt_table;
467 P3.L = _dpdt_swapcount_table;
468 P3.H = _dpdt_swapcount_table;
469 P3 += -4;
470.Ldicount:
471 R2 = [P2];
472 P2 += 8;
473 P3 += 8;
474 CC = R2==-1;
475 IF CC JUMP .Ldicount_done;
476 CC = R7==R2;
477 IF !CC JUMP .Ldicount;
478 R7 = [P3];
479 R7 += 1;
480 [P3] = R7;
481.Ldicount_done:
482#endif
483
484 /* Clean down the hardware loops*/
485 R2 = 0;
486 LC1 = R2;
487 LC0 = R2;
488
489 /* There's a suitable victim in [P0-4] (because we've
490 * advanced already).
491 */
492
493.LDdoverwrite:
494
495 /* [P0-4] is a suitable victim CPLB, so we want to
496 * overwrite it by moving all the following CPLBs
497 * one space closer to the start.
498 */
499
Mike Frysingere208f832007-07-25 10:11:42 +0800500 R1.L = LO(DCPLB_DATA16); /* DCPLB_DATA15 + 4 */
501 R1.H = HI(DCPLB_DATA16);
Bryan Wu1394f032007-05-06 14:50:22 -0700502 R0 = P0;
503
504 /* If the victim happens to be in DCPLB15,
505 * we don't need to move anything.
506 */
507
508 CC = R1 == R0;
509 IF CC JUMP .Lde_moved;
510 R1 = R1 - R0;
511 R1 >>= 2;
512 P1 = R1;
513 LSETUP(.Lds_move, .Lde_move) LC0=P1;
514.Lds_move:
515 R0 = [P0++]; /* move data */
516 [P0 - 8] = R0;
517 R0 = [P0-0x104] /* move address */
518.Lde_move: [P0-0x108] = R0;
519
520 /* We've now made space in DCPLB15 for the new CPLB to be
521 * installed. The next stage is to locate a CPLB in the
522 * config table that covers the faulting address.
523 */
524
525.Lde_moved:NOP;
526 R0 = I0; /* Our faulting address */
527
528 P2.L = _dpdt_table;
529 P2.H = _dpdt_table;
530#ifdef CONFIG_CPLB_INFO
531 P3.L = _dpdt_swapcount_table;
532 P3.H = _dpdt_swapcount_table;
533 P3 += -8;
534#endif
535
536 P1.L = _page_size_table;
537 P1.H = _page_size_table;
538
539 /* An extraction pattern, to retrieve bits 17:16.*/
540
541 R1 = (16<<8)|2;
542.Ldnext: R4 = [P2++]; /* address */
543 R2 = [P2++]; /* data */
544#ifdef CONFIG_CPLB_INFO
545 P3 += 8;
546#endif
547
548 CC = R4 == -1;
549 IF CC JUMP .Lno_page_in_table;
550
551 /* See if failed address > start address */
552 CC = R4 <= R0(IU);
553 IF !CC JUMP .Ldnext;
554
555 /* extract page size (17:16)*/
556 R3 = EXTRACT(R2, R1.L) (Z);
557
558 /* add page size to addr to get range */
559
560 P5 = R3;
561 P5 = P1 + (P5 << 2);
562 R3 = [P5];
563 R3 = R3 + R4;
564
565 /* See if failed address < (start address + page size) */
566 CC = R0 < R3(IU);
567 IF !CC JUMP .Ldnext;
568
569 /* We've found the CPLB that should be installed, so
570 * write it into CPLB15, masking off any caching bits
571 * if necessary.
572 */
573
Mike Frysingere208f832007-07-25 10:11:42 +0800574 P1.L = LO(DCPLB_DATA15);
575 P1.H = HI(DCPLB_DATA15);
Bryan Wu1394f032007-05-06 14:50:22 -0700576
577 /* If the DCPLB has cache bits set, but caching hasn't
578 * been enabled, then we want to mask off the cache-in-L1
579 * bit before installing. Moreover, if caching is off, we
580 * also want to ensure that the DCPLB has WT mode set, rather
581 * than WB, since WB pages still trigger first-write exceptions
582 * even when not caching is off, and the page isn't marked as
583 * cachable. Finally, we could mark the page as clean, not dirty,
584 * but we choose to leave that decision to the user; if the user
585 * chooses to have a CPLB pre-defined as dirty, then they always
586 * pay the cost of flushing during eviction, but don't pay the
587 * cost of first-write exceptions to mark the page as dirty.
588 */
589
Robin Getz3bebca22007-10-10 23:55:26 +0800590#ifdef CONFIG_BFIN_WT
Bryan Wu1394f032007-05-06 14:50:22 -0700591 BITSET(R6, 14); /* Set WT*/
592#endif
593
594 [P1] = R2;
595 [P1-0x100] = R4;
596#ifdef CONFIG_CPLB_INFO
597 R3 = [P3];
598 R3 += 1;
599 [P3] = R3;
600#endif
601
602 /* We've installed the CPLB, so re-enable CPLBs. P4
603 * points to DMEM_CONTROL, and R5 is the value we
604 * last wrote to it, when we were disabling CPLBs.
605 */
606
607 BITSET(R5,ENDCPLB_P);
608 CLI R2;
609 .align 8;
610 [P4] = R5;
611 SSYNC;
612 STI R2;
613
614 ( R7:4,P5:3 ) = [SP++];
615 R0 = CPLB_RELOADED;
616 RTS;
Mike Frysinger51be24c2007-06-11 15:31:30 +0800617ENDPROC(_cplb_mgr)
Bryan Wu1394f032007-05-06 14:50:22 -0700618
619.data
620.align 4;
621_page_size_table:
622.byte4 0x00000400; /* 1K */
623.byte4 0x00001000; /* 4K */
624.byte4 0x00100000; /* 1M */
625.byte4 0x00400000; /* 4M */
626
627.align 4;
628_dcplb_preference:
629.byte4 0x00000001; /* valid bit */
630.byte4 0x00000002; /* lock bit */