Changeset 5265eea4 in mainline for kernel/arch/arm32/include/arch/cp15.h
- Timestamp:
- 2015-10-28T18:17:27Z (9 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 77a194c, ff381a7
- Parents:
- 0328987 (diff), 5783d10 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/arm32/include/arch/cp15.h
r0328987 r5265eea4 118 118 }; 119 119 CONTROL_REG_GEN_READ(CTR, c0, 0, c0, 1); 120 121 #if defined(PROCESSOR_ARCH_armv6) || defined(PROCESSOR_ARCH_armv7_a) 120 122 CONTROL_REG_GEN_READ(TCMR, c0, 0, c0, 2); 123 124 enum { 125 TLBTR_SEP_FLAG = 1, 126 }; 127 121 128 CONTROL_REG_GEN_READ(TLBTR, c0, 0, c0, 3); 129 #endif 130 131 #if defined(PROCESSOR_ARCH_armv7_a) 122 132 CONTROL_REG_GEN_READ(MPIDR, c0, 0, c0, 5); 123 133 CONTROL_REG_GEN_READ(REVIDR, c0, 0, c0, 6); 134 #endif 124 135 125 136 enum { … … 309 320 enum { 310 321 TTBR_ADDR_MASK = 0xffffff80, 322 #if defined(PROCESSOR_ARCH_armv6) || defined(PROCESSOR_ARCH_armv7_a) 311 323 TTBR_NOS_FLAG = 1 << 5, 312 324 TTBR_RGN_MASK = 0x3 << 3, … … 317 329 TTBR_S_FLAG = 1 << 1, 318 330 TTBR_C_FLAG = 1 << 0, 331 #endif 319 332 }; 320 333 CONTROL_REG_GEN_READ(TTBR0, c2, 0, c0, 0); 321 334 CONTROL_REG_GEN_WRITE(TTBR0, c2, 0, c0, 0); 335 336 #if defined(PROCESSOR_ARCH_armv6) || defined(PROCESSOR_ARCH_armv7_a) 322 337 CONTROL_REG_GEN_READ(TTBR1, c2, 0, c0, 1); 323 338 CONTROL_REG_GEN_WRITE(TTBR1, c2, 0, c0, 1); 324 339 CONTROL_REG_GEN_READ(TTBCR, c2, 0, c0, 2); 325 340 CONTROL_REG_GEN_WRITE(TTBCR, c2, 0, c0, 2); 326 341 #endif 342 343 #if defined(PROCESSOR_ARCH_armv7) 327 344 CONTROL_REG_GEN_READ(HTCR, c2, 4, c0, 2); 328 345 CONTROL_REG_GEN_WRITE(HTCR, c2, 4, c0, 2); … … 339 356 CONTROL_REG_GEN_READ(VTTBRH, c2, 0, c2, 6); 340 357 CONTROL_REG_GEN_WRITE(VTTBRH, c2, 0, c2, 6); 358 #endif 341 359 342 360 CONTROL_REG_GEN_READ(DACR, c3, 0, c0, 0); … … 373 391 CONTROL_REG_GEN_WRITE(HPFAR, c6, 4, c0, 4); 374 392 375 /* Cache maintenance, address translation and other */ 376 CONTROL_REG_GEN_WRITE(WFI, c7, 0, c0, 4); /* armv6 only */ 377 CONTROL_REG_GEN_WRITE(ICIALLLUIS, c7, 0, c1, 0); 378 CONTROL_REG_GEN_WRITE(BPIALLIS, c7, 0, c1, 6); 379 CONTROL_REG_GEN_READ(PAR, c7, 0, c4, 0); 380 CONTROL_REG_GEN_WRITE(PAR, c7, 0, c4, 0); 381 CONTROL_REG_GEN_READ(PARH, c7, 0, c7, 0); /* PAE */ 382 CONTROL_REG_GEN_WRITE(PARH, c7, 0, c7, 0); /* PAE */ 383 CONTROL_REG_GEN_WRITE(ICIALLU, c7, 0, c5, 0); 384 CONTROL_REG_GEN_WRITE(ICIMVAU, c7, 0, c5, 1); 393 /* 394 * Cache maintenance, address translation and other 395 */ 396 397 #if defined(PROCESSOR_cortex_a8) 398 #define CP15_C7_MVA_ALIGN 64 399 #elif defined(PROCESSOR_arm1176) 400 #define CP15_C7_MVA_ALIGN 32 401 #elif defined(PROCESSOR_arm926ej_s) 402 #define CP15_C7_MVA_ALIGN 32 403 #elif defined(PROCESSOR_arm920t) 404 #define CP15_C7_MVA_ALIGN 32 405 #else 406 #error Unknow MVA alignment 407 #endif 408 409 #if defined(PROCESSOR_ARCH_armv6) || defined(PROCESSOR_ARCH_armv7_a) 385 410 CONTROL_REG_GEN_WRITE(CP15ISB, c7, 0, c5, 4); 386 411 CONTROL_REG_GEN_WRITE(BPIALL, c7, 0, c5, 6); 387 412 CONTROL_REG_GEN_WRITE(BPIMVA, c7, 0, c5, 7); 388 413 #endif 414 415 #if !defined(PROCESSOR_arm920t) 416 CONTROL_REG_GEN_WRITE(DCISW, c7, 0, c6, 2); 417 #endif 418 419 #if defined(PROCESSOR_arm920t) || !defined(PROCESSOR_ARCH_armv4) 420 CONTROL_REG_GEN_WRITE(DCCSW, c7, 0, c10, 2); 421 #endif 422 423 CONTROL_REG_GEN_WRITE(CP15DSB, c7, 0, c10, 4); 424 425 #if defined(PROCESSOR_ARCH_armv6) || defined(PROCESSOR_ARCH_armv7_a) 426 CONTROL_REG_GEN_WRITE(CP15DMB, c7, 0, c10, 5); 427 #endif 428 429 #if defined(PROCESSOR_arm920t) || !defined(PROCESSOR_ARCH_armv4) 430 CONTROL_REG_GEN_WRITE(DCCISW, c7, 0, c14, 2); 431 #endif 432 433 #if defined(PROCESSOR_ARCH_armv7_a) 434 CONTROL_REG_GEN_WRITE(ICIALLLUIS, c7, 0, c1, 0); 435 CONTROL_REG_GEN_WRITE(BPIALLIS, c7, 0, c1, 6); 436 CONTROL_REG_GEN_READ(PAR, c7, 0, c4, 0); /* Security Extensions */ 437 CONTROL_REG_GEN_WRITE(PAR, c7, 0, c4, 0); /* Security Extensions */ 438 CONTROL_REG_GEN_WRITE(ICIALLU, c7, 0, c5, 0); 439 CONTROL_REG_GEN_WRITE(ICIMVAU, c7, 0, c5, 1); 389 440 CONTROL_REG_GEN_WRITE(DCIMVAC, c7, 0, c6, 1); 390 CONTROL_REG_GEN_ WRITE(DCISW, c7, 0, c6, 2);391 392 CONTROL_REG_GEN_WRITE(ATS1CPR, c7, 0, c8, 0); 393 CONTROL_REG_GEN_WRITE(ATS1CPW, c7, 0, c8, 1); 394 CONTROL_REG_GEN_WRITE(ATS1CUR, c7, 0, c8, 2); 395 CONTROL_REG_GEN_WRITE(ATS1CUW, c7, 0, c8, 3); 396 CONTROL_REG_GEN_WRITE(ATS12NSOPR, c7, 0, c8, 4); 397 CONTROL_REG_GEN_WRITE(ATS12NSOPW, c7, 0, c8, 5); 398 CONTROL_REG_GEN_WRITE(ATS12NSOUR, c7, 0, c8, 6); 399 CONTROL_REG_GEN_WRITE(ATS12NSOUW, c7, 0, c8, 7); 400 401 441 CONTROL_REG_GEN_READ(PARH, c7, 0, c7, 0); /* PAE */ 442 CONTROL_REG_GEN_WRITE(PARH, c7, 0, c7, 0); /* PAE */ 443 CONTROL_REG_GEN_WRITE(ATS1CPR, c7, 0, c8, 0); /* Security Extensions */ 444 CONTROL_REG_GEN_WRITE(ATS1CPW, c7, 0, c8, 1); /* Security Extensions */ 445 CONTROL_REG_GEN_WRITE(ATS1CUR, c7, 0, c8, 2); /* Security Extensions */ 446 CONTROL_REG_GEN_WRITE(ATS1CUW, c7, 0, c8, 3); /* Security Extensions */ 447 CONTROL_REG_GEN_WRITE(ATS12NSOPR, c7, 0, c8, 4); /* Security Extensions */ 448 CONTROL_REG_GEN_WRITE(ATS12NSOPW, c7, 0, c8, 5); /* Security Extensions */ 449 CONTROL_REG_GEN_WRITE(ATS12NSOUR, c7, 0, c8, 6); /* Security Extensions */ 450 CONTROL_REG_GEN_WRITE(ATS12NSOUW, c7, 0, c8, 7); /* Security Extensions */ 451 CONTROL_REG_GEN_WRITE(ATS1HR, c7, 4, c8, 0); /* Virtualization Extensions */ 452 CONTROL_REG_GEN_WRITE(ATS1HW, c7, 4, c8, 1); /* Virtualization Extensions */ 402 453 CONTROL_REG_GEN_WRITE(DCCMVAC, c7, 0, c10, 1); 403 CONTROL_REG_GEN_WRITE(DCCSW, c7, 0, c10, 2);404 CONTROL_REG_GEN_WRITE(CP15DSB, c7, 0, c10, 4);405 CONTROL_REG_GEN_WRITE(CP15DMB, c7, 0, c10, 5);406 454 CONTROL_REG_GEN_WRITE(DCCMVAU, c7, 0, c11, 1); 407 408 CONTROL_REG_GEN_WRITE(PFI, c7, 0, c11, 1); /* armv6 only */409 410 455 CONTROL_REG_GEN_WRITE(DCCIMVAC, c7, 0, c14, 1); 411 CONTROL_REG_GEN_WRITE(DCCISW, c7, 0, c14, 2); 412 413 CONTROL_REG_GEN_WRITE(ATS1HR, c7, 4, c8, 0); 414 CONTROL_REG_GEN_WRITE(ATS1HW, c7, 4, c8, 1); 456 #else 457 458 #if defined(PROCESSOR_arm920t) || !defined(PROCESSOR_ARCH_armv4) 459 CONTROL_REG_GEN_WRITE(WFI, c7, 0, c0, 4); 460 #endif 461 462 CONTROL_REG_GEN_WRITE(ICIALL, c7, 0, c5, 0); 463 CONTROL_REG_GEN_WRITE(ICIMVA, c7, 0, c5, 1); 464 465 #if !defined(PROCESSOR_ARCH_armv4) 466 CONTROL_REG_GEN_WRITE(ICISW, c7, 0, c5, 2); 467 #endif 468 469 CONTROL_REG_GEN_WRITE(DCIALL, c7, 0, c6, 0); 470 CONTROL_REG_GEN_WRITE(DCIMVA, c7, 0, c6, 1); 471 CONTROL_REG_GEN_WRITE(CIALL, c7, 0, c7, 0); 472 CONTROL_REG_GEN_WRITE(CIMVA, c7, 0, c7, 1); 473 474 #if !defined(PROCESSOR_ARCH_armv4) 475 CONTROL_REG_GEN_WRITE(CISW, c7, 0, c7, 2); 476 #endif 477 478 #if defined(PROCESSOR_ARCH_armv4) || defined(PROCESSOR_ARCH_armv6) 479 CONTROL_REG_GEN_WRITE(DCCALL, c7, 0, c10, 0); 480 #endif 481 482 CONTROL_REG_GEN_WRITE(DCCMVA, c7, 0, c10, 1); 483 484 #if defined(PROCESSOR_ARCH_armv4) || defined(PROCESSOR_ARCH_armv6) 485 CONTROL_REG_GEN_WRITE(CCALL, c7, 0, c11, 0); 486 #endif 487 488 CONTROL_REG_GEN_WRITE(CCMVA, c7, 0, c11, 1); 489 490 #if !defined(PROCESSOR_ARCH_armv4) 491 CONTROL_REG_GEN_WRITE(CCSW, c7, 0, c11, 2); 492 #endif 493 494 #if defined(PROCESSOR_arm920t) || !defined(PROCESSOR_ARCH_armv4) 495 CONTROL_REG_GEN_WRITE(PFIMVA, c7, 0, c13, 1); 496 #endif 497 498 #if defined(PROCESSOR_ARCH_armv4) || defined(PROCESSOR_ARCH_armv6) 499 CONTROL_REG_GEN_WRITE(DCCIALL, c7, 0, c14, 0); 500 #endif 501 502 CONTROL_REG_GEN_WRITE(DCCIMVA, c7, 0, c14, 1); 503 504 #if defined(PROCESSOR_ARCH_armv4) || defined(PROCESSOR_ARCH_armv6) 505 CONTROL_REG_GEN_WRITE(CCIALL, c7, 0, c15, 0); 506 #endif 507 508 CONTROL_REG_GEN_WRITE(CCIMVA, c7, 0, c15, 1); 509 510 #if defined(PROCESSOR_ARCH_armv5) || defined(PROCESSOR_ARCH_armv6) 511 CONTROL_REG_GEN_WRITE(CCISW, c7, 0, c15, 2); 512 #endif 513 514 #endif 415 515 416 516 /* TLB maintenance */ 517 #if defined(PROCESSOR_ARCH_armv7_a) 417 518 CONTROL_REG_GEN_WRITE(TLBIALLIS, c8, 0, c3, 0); /* Inner shareable */ 418 519 CONTROL_REG_GEN_WRITE(TLBIMVAIS, c8, 0, c3, 1); /* Inner shareable */ 419 520 CONTROL_REG_GEN_WRITE(TLBIASIDIS, c8, 0, c3, 2); /* Inner shareable */ 420 521 CONTROL_REG_GEN_WRITE(TLBIMVAAIS, c8, 0, c3, 3); /* Inner shareable */ 522 #endif 421 523 422 524 CONTROL_REG_GEN_WRITE(ITLBIALL, c8, 0, c5, 0); 423 525 CONTROL_REG_GEN_WRITE(ITLBIMVA, c8, 0, c5, 1); 526 #if defined(PROCESSOR_ARCH_armv6) || defined(PROCESSOR_ARCH_armv7_a) 424 527 CONTROL_REG_GEN_WRITE(ITLBIASID, c8, 0, c5, 2); 528 #endif 425 529 426 530 CONTROL_REG_GEN_WRITE(DTLBIALL, c8, 0, c6, 0); 427 531 CONTROL_REG_GEN_WRITE(DTLBIMVA, c8, 0, c6, 1); 532 #if defined(PROCESSOR_ARCH_armv6) || defined(PROCESSOR_ARCH_armv7_a) 428 533 CONTROL_REG_GEN_WRITE(DTLBIASID, c8, 0, c6, 2); 534 #endif 429 535 430 536 CONTROL_REG_GEN_WRITE(TLBIALL, c8, 0, c7, 0); 431 537 CONTROL_REG_GEN_WRITE(TLBIMVA, c8, 0, c7, 1); 538 #if defined(PROCESSOR_ARCH_armv6) || defined(PROCESSOR_ARCH_armv7_a) 432 539 CONTROL_REG_GEN_WRITE(TLBIASID, c8, 0, c7, 2); 540 #endif 541 #if defined(PROCESSOR_ARCH_armv7_a) 433 542 CONTROL_REG_GEN_WRITE(TLBIMVAA, c8, 0, c7, 3); 434 543 #endif 544 545 #if defined(PROCESSOR_ARCH_armv7_a) 435 546 CONTROL_REG_GEN_WRITE(TLBIALLHIS, c8, 4, c3, 0); /* Inner shareable */ 436 547 CONTROL_REG_GEN_WRITE(TLBIMVAHIS, c8, 4, c3, 1); /* Inner shareable */ 437 548 CONTROL_REG_GEN_WRITE(TLBIALLNSNHIS, c8, 4, c3, 4); /* Inner shareable */ 438 549 #endif 550 551 #if defined(PROCESSOR_ARCH_armv7_a) 439 552 CONTROL_REG_GEN_WRITE(TLBIALLH, c8, 4, c7, 0); 440 553 CONTROL_REG_GEN_WRITE(TLBIMVAH, c8, 4, c7, 1); 441 554 CONTROL_REG_GEN_WRITE(TLBIALLNSNHS, c8, 4, c7, 4); 555 #endif 442 556 443 557 /* c9 are performance monitoring resgisters */
Note:
See TracChangeset
for help on using the changeset viewer.