Qwerty
    @Qwerty:不好意思,找到了。楼主以后如果有引用之前分析过的部分,可以加个链接。:)
    X-004-UBOOT-串口驱动移植(Bubblegum-96平台)  发表时间:2017-03-24 17:08
    Qwerty
    你好。没有写过驱动,进展到此处,应该去看哪部分子系统的分析?
    X-004-UBOOT-串口驱动移植(Bubblegum-96平台)  发表时间:2017-03-24 17:03
    zhusbj
    针对 MMU OFF / Cache ON有一些不同的见解。摘自ARMv8-A TRM --------------------------------------------------------- Behavior when stage 1 address translation is disabled When a stage 1 address translation is disabled, memory accesses that would otherwise be translated by that stage of translation are treated as follows: Non-secure EL1 and EL0 accesses if the HCR_EL2.DC bit is set to 1 For the Non-secure EL1&0 translation regime, when the value of HCR_EL2.DC is 1, the stage 1 translation assigns the Normal Non-shareable, Inner Write-Back Read-Write-Allocate, Outer Write-Back Read-Write-Allocate memory attributes. Note This applies for both instruction and data accesses. All other accesses For all other accesses, when stage 1 address translation is disabled, the assigned attributes depend on whether the access is a data access or an instruction access, as follows: Data access The stage 1 translation assigns the Device-nGnRnE memory type. Instruction access The stage 1 translation assigns the Normal memory attribute, with the cacheability and shareability attributes determined by the value of the SCTLR.I bit for the translation regime, as follows: When the value of I is 0 The stage 1 translation assigns the Non-cacheable and Outer Shareable attributes. When the value of I is 1 The stage 1 translation assigns the Cacheable, Inner Write-Through no Write-Allocate Read-Allocate, Outer Write-Through no Write-Allocate Read Allocate Outer Shareable attribute. --------------------------------------------------------- DC, bit [12] Default Cacheable. When this bit is set to 1, this causes: • The SCTLR_EL1.M bit to behave as 0 when in the Non-secure state for all purposes other than reading the value of the bit. • The HCR_EL2.VM bit to behave as 1 when in the Non-secure state for all purposes other than reading the value of the bit. The memory type produced by the first stage of translation used by EL1 and EL0 is Normal Non-Shareable, Inner WriteBack Read-WriteAllocate, Outer WriteBack Read-WriteAllocate. When this bit is 0 and the stage 1 MMU is disabled, the default memory attribute for Data accesses is Device-nGnRnE. This bit is permitted to be cached in a TLB. --------------------------------------------------------- 楼主的解释需要一个前提条件,就是HCR_EL2.DC 必须已经置1。但是这个bit默认值很可能是0,并且代码中也没有置1的操作,所以memory的属性应该是Device-nGnRnE for data access。对于 instruction access,取决于SCTLR.I bit。
    ARM64的启动过程之(一):内核第一个脚印  发表时间:2017-03-24 16:01
    justin-wjb
    @SleepDeXiang:你的回复太逗了~~~
    linux内核中的GPIO系统之(2):pin control subsystem  发表时间:2017-03-24 15:18
    zhusbj
    从英文表述来看,因为device属性的memory store指令和cache 指令没有数据依赖关系,所以可以乱序执行。 但是源代码中明显是考虑到了 cache on的情况,否则也不必要在最后调用一下 cache invalidate操作。 所以我觉得在能保证 non-cacheable 的情况下,可以不必插入dmb指令。
    ARM64的启动过程之(一):内核第一个脚印  发表时间:2017-03-24 15:16
    linuxer
    @adance:其实我对这些概念也不是理解的特别透彻,但是我的理解就是memory barrier和cache coherence protocol是两码事。
    Linux内核同步机制之(三):memory barrier  发表时间:2017-03-23 16:33
    randy
    @linuxer:真正醉心于技术的人特别是linux kernel这种博大精深的,常常会有这个想法。很佩服你还能挤出时间写这些技术博客,像我,工作时间越久越感觉能花在技术上的时间越少
    中断上下文中调度会怎样?  发表时间:2017-03-23 14:58
    raintiliang
    力出一孔,水滴石穿,很多时候,我们忙着项目,无法从项目抽身,唯有项目到总结,这样成长才是最快的,祝福蜗窝,也要身体力行学习。
    关于蜗窝  发表时间:2017-03-23 12:06
    adance
    @linuxer:感谢您的回复! 我们先抛开编译器优化带来的乱序,就讨论你上文第二种cpu乱序: 其实你上面你讲的过程中就是基于一致性协议MESI的, 我是这么理解的:以上你讲的CPU内存访问乱序其实是由于store buffer和 Invalidate Queue等结构造成的,假如没有它们,这里以你上文的store buffer例子来假设,假设没有store buffer,cpu0读取变量a的值时只能等待cpu1返回a的值并对invalidate的回应,这样的话是不是就不会有乱序了呢? Invalidate Queue也可以以此推断,但是cpu加这两个就是为了提升性能,不至于空等待,加快处理速度,所以我觉得,这种cpu内存访问乱序的问题是为了考虑性能而对一致性协议MESI只支持弱一致性,要是强一致性,理想状态下就不会有这种问题,所以这种乱序还是属于一致性范围,cpu也提供了软件层面的memory barrier指令,来满足应用某些场合强一致性的要求。 请指教!
    Linux内核同步机制之(三):memory barrier  发表时间:2017-03-23 11:07
    wowo
    @foolishungry:其实从协议的角度看,需要尽量封装以屏蔽技术细节,以BLE协议为例:经过物理层的封装,在链路层就已经不再有物理channel的概念了。这样对产业化应用来说,当然是非常好的。 不过,来看你的需求,你需要每一个channel(我就当作物理通道了)的RSSI,显然,这与协议封装、抽象的天性是相悖的。 因此,不要指望能从成熟的、产业化的解决方案中找到答案! 你的需求,随便用一个2.4GHz的tranceiver都能搞定(想利用现有的手机等蓝牙功能,就不太可能了)。
    留言板  发表时间:2017-03-23 10:58

共7862条307/787上一页 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 下一页
Copyright @ 2013-2015 蜗窝科技 All rights reserved. Powered by emlog