Rev 3839 | Rev 3857 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3839 | Rev 3856 | ||
---|---|---|---|
Line 24... | Line 24... | ||
24 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
24 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
25 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
25 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
27 | */ |
27 | */ |
28 | 28 | ||
29 | /** @addtogroup ppc32mm |
29 | /** @addtogroup ppc32mm |
30 | * @{ |
30 | * @{ |
31 | */ |
31 | */ |
32 | /** @file |
32 | /** @file |
33 | */ |
33 | */ |
34 | 34 | ||
Line 45... | Line 45... | ||
45 | 45 | ||
46 | static unsigned int seed = 10; |
46 | static unsigned int seed = 10; |
47 | static unsigned int seed_real __attribute__ ((section("K_UNMAPPED_DATA_START"))) = 42; |
47 | static unsigned int seed_real __attribute__ ((section("K_UNMAPPED_DATA_START"))) = 42; |
48 | 48 | ||
49 | 49 | ||
- | 50 | #define TLB_FLUSH \ |
|
- | 51 | "tlbie %0\n" \ |
|
- | 52 | "addi %0, %0, 0x1000\n" |
|
- | 53 | ||
- | 54 | ||
50 | /** Try to find PTE for faulting address |
55 | /** Try to find PTE for faulting address |
51 | * |
56 | * |
52 | * Try to find PTE for faulting address. |
57 | * Try to find PTE for faulting address. |
53 | * The as->lock must be held on entry to this function |
58 | * The as->lock must be held on entry to this function |
54 | * if lock is true. |
59 | * if lock is true. |
Line 409... | Line 414... | ||
409 | } |
414 | } |
410 | 415 | ||
411 | 416 | ||
412 | void tlb_invalidate_all(void) |
417 | void tlb_invalidate_all(void) |
413 | { |
418 | { |
- | 419 | uint32_t index; |
|
414 | asm volatile ( |
420 | asm volatile ( |
- | 421 | "li %0, 0\n" |
|
- | 422 | "sync\n" |
|
- | 423 | ||
- | 424 | TLB_FLUSH |
|
- | 425 | TLB_FLUSH |
|
- | 426 | TLB_FLUSH |
|
- | 427 | TLB_FLUSH |
|
- | 428 | TLB_FLUSH |
|
- | 429 | TLB_FLUSH |
|
- | 430 | TLB_FLUSH |
|
- | 431 | TLB_FLUSH |
|
- | 432 | ||
- | 433 | TLB_FLUSH |
|
- | 434 | TLB_FLUSH |
|
- | 435 | TLB_FLUSH |
|
- | 436 | TLB_FLUSH |
|
- | 437 | TLB_FLUSH |
|
- | 438 | TLB_FLUSH |
|
- | 439 | TLB_FLUSH |
|
- | 440 | TLB_FLUSH |
|
- | 441 | ||
- | 442 | TLB_FLUSH |
|
- | 443 | TLB_FLUSH |
|
- | 444 | TLB_FLUSH |
|
- | 445 | TLB_FLUSH |
|
- | 446 | TLB_FLUSH |
|
- | 447 | TLB_FLUSH |
|
- | 448 | TLB_FLUSH |
|
- | 449 | TLB_FLUSH |
|
- | 450 | ||
- | 451 | TLB_FLUSH |
|
- | 452 | TLB_FLUSH |
|
- | 453 | TLB_FLUSH |
|
- | 454 | TLB_FLUSH |
|
- | 455 | TLB_FLUSH |
|
- | 456 | TLB_FLUSH |
|
- | 457 | TLB_FLUSH |
|
- | 458 | TLB_FLUSH |
|
- | 459 | ||
- | 460 | TLB_FLUSH |
|
- | 461 | TLB_FLUSH |
|
- | 462 | TLB_FLUSH |
|
- | 463 | TLB_FLUSH |
|
- | 464 | TLB_FLUSH |
|
- | 465 | TLB_FLUSH |
|
- | 466 | TLB_FLUSH |
|
- | 467 | TLB_FLUSH |
|
- | 468 | ||
- | 469 | TLB_FLUSH |
|
- | 470 | TLB_FLUSH |
|
- | 471 | TLB_FLUSH |
|
- | 472 | TLB_FLUSH |
|
- | 473 | TLB_FLUSH |
|
- | 474 | TLB_FLUSH |
|
- | 475 | TLB_FLUSH |
|
- | 476 | TLB_FLUSH |
|
- | 477 | ||
- | 478 | TLB_FLUSH |
|
- | 479 | TLB_FLUSH |
|
- | 480 | TLB_FLUSH |
|
- | 481 | TLB_FLUSH |
|
- | 482 | TLB_FLUSH |
|
- | 483 | TLB_FLUSH |
|
- | 484 | TLB_FLUSH |
|
- | 485 | TLB_FLUSH |
|
- | 486 | ||
- | 487 | TLB_FLUSH |
|
- | 488 | TLB_FLUSH |
|
- | 489 | TLB_FLUSH |
|
- | 490 | TLB_FLUSH |
|
- | 491 | TLB_FLUSH |
|
- | 492 | TLB_FLUSH |
|
- | 493 | TLB_FLUSH |
|
- | 494 | TLB_FLUSH |
|
- | 495 | ||
- | 496 | "eieio\n" |
|
415 | "tlbsync\n" |
497 | "tlbsync\n" |
- | 498 | "sync\n" |
|
- | 499 | : "=r" (index) |
|
416 | ); |
500 | ); |
417 | } |
501 | } |
418 | 502 | ||
419 | 503 | ||
420 | void tlb_invalidate_asid(asid_t asid) |
504 | void tlb_invalidate_asid(asid_t asid) |