niufei
    你好!蜗蜗,我有好几个问题想请教一下,我用的是friendlyarm的uboot-nanopi2,这个uboot跟你们说的都不太一样。 下面是我粘贴的start.s代码 .globl reset reset: bl save_boot_params mrs r0, cpsr bic r0, r0, #0x1f orr r0, r0, #0xd3 msr cpsr,r0 #ifndef CONFIG_SKIP_LOWLEVEL_INIT bl cpu_init_cp15 bl cpu_init_crit #endif #ifdef CONFIG_RELOC_TO_TEXT_BASE relocate_to_text: /* * relocate u-boot code on memory to text base * for nexell arm core (add by jhkim) */ adr r0, _stext /* r0 <- current position of code */ ldr r1, TEXT_BASE /* test if we run from flash or RAM */ cmp r0, r1 /* don't reloc during debug */ beq clear_bss ldr r2, _bss_start_ofs add r2, r0, r2 /* r2 <- source end address */ copy_loop_text: ldmia r0!, {r3-r10} /* copy from source address [r0] */ stmia r1!, {r3-r10} /* copy to target address [r1] */ cmp r0, r2 /* until source end addreee [r2] */ ble copy_loop_text ldr r1, TEXT_BASE /* restart at text base */ mov pc, r1 clear_bss: ldr r0, _bss_start_ofs ldr r1, _bss_end_ofs ldr r4, TEXT_BASE /* text addr */ add r0, r0, r4 add r1, r1, r4 mov r2, #0x00000000 /* clear */ clbss_l:str r2, [r0] /* clear loop... */ add r0, r0, #4 cmp r0, r1 bne clbss_l #ifdef CONFIG_MMU_ENABLE bl mmu_turn_on #endif ldr sp, =(CONFIG_SYS_INIT_SP_ADDR) bic sp, sp, #7 /* 8-byte alignment for ABI compliance */ sub sp, #GD_SIZE /* allocate one GD above SP */ bic sp, sp, #7 /* 8-byte alignment for ABI compliance */ mov r9, sp /* GD is above SP */ mov r0, #0 bl board_init_f mov sp, r9 /* SP is GD's base address */ bic sp, sp, #7 /* 8-byte alignment for ABI compliance */ sub sp, #GENERATED_BD_INFO_SIZE /* allocate one BD above SP */ bic sp, sp, #7 /* 8-byte alignment for ABI compliance */ mov r0, r9 /* gd_t *gd */ ldr r1, TEXT_BASE /* ulong text */ mov r2, sp /* ulong sp */ bl gdt_reset /* call board_init_r(gd_t *id, ulong dest_addr) */ mov r0, r9 /* gd_t */ ldr r1, =(CONFIG_SYS_MALLOC_END) /* dest_addr for malloc heap end */ /* call board_init_r */ ldr pc, =board_init_r /* this is auto-relocated! */ #else /* CONFIG_RELOC_TO_TEXT_BASE */ bl _main #endif /*------------------------------------------------------------------------------*/ ENTRY(c_runtime_cpu_setup) /* * If I-cache is enabled invalidate it */ #ifndef CONFIG_SYS_ICACHE_OFF mcr p15, 0, r0, c7, c5, 0 @ invalidate icache mcr p15, 0, r0, c7, c10, 4 @ DSB mcr p15, 0, r0, c7, c5, 4 @ ISB #endif /* * Move vector table */ /* Set vector address in CP15 VBAR register */ ldr r0, =_stext mcr p15, 0, r0, c12, c0, 0 @Set VBAR bx lr ENDPROC(c_runtime_cpu_setup) ENTRY(save_boot_params) bx lr @ back to my caller ENDPROC(save_boot_params) .weak save_boot_params ENTRY(cpu_init_cp15) mov r0, #0 @ set up for MCR mcr p15, 0, r0, c8, c7, 0 @ invalidate TLBs mcr p15, 0, r0, c7, c5, 0 @ invalidate icache mcr p15, 0, r0, c7, c5, 6 @ invalidate BP array dsb isb mrc p15, 0, r0, c1, c0, 0 bic r0, r0, #0x00002000 @ clear bits 13 (--V-) bic r0, r0, #0x00000007 @ clear bits 2:0 (-CAM) orr r0, r0, #0x00000002 @ set bit 1 (--A-) Align orr r0, r0, #0x00000800 @ set bit 11 (Z---) BTB #ifdef CONFIG_SYS_ICACHE_OFF bic r0, r0, #0x00001000 @ clear bit 12 (I) I-cache #else orr r0, r0, #0x00001000 @ set bit 12 (I) I-cache #endif mcr p15, 0, r0, c1, c0, 0 mov pc, lr @ back to my caller ENDPROC(cpu_init_cp15) #ifndef CONFIG_SKIP_LOWLEVEL_INIT ENTRY(cpu_init_crit) b lowlevel_init @ go setup pll,mux,memory ENDPROC(cpu_init_crit) #endif 这里面有个配置项叫 CONFIG_RELOC_TO_TEXT_BASE 这个板子现在用的是SD卡启动,理论上是肯定要relocate的对吗??? 再往下看, bl cpu_init_cp15 bl cpu_init_crit 之后直接就进入了 copy_loop_text: ldmia r0!, {r3-r10} /* copy from source address [r0] */ stmia r1!, {r3-r10} /* copy to target address [r1] */ cmp r0, r2 /* until source end addreee [r2] */ ble copy_loop_text ldr r1, TEXT_BASE /* restart at text base */ mov pc, r1 关键是最后两行ldr r1,TEXT_BASE mov pc,r1,上面几行就是将从stext开始的代码拷贝到了TEXT_BASE的地址,这两句的意思是说回到TEXT_BASE地址处执行代码,这样不就是把uboot(从reset 入口开始)重新运行了一遍吗?我感觉是这样,蜗蜗你说呢???我想确认一下。还有uboot那么多代码,不同的板子有各自的代码,uboot是通过mkfile和.mk文件来识别的吗? 谢谢了,新手linuxer 拜谢。
    u-boot启动流程分析(2)_板级(board)部分  发表时间:2018-03-21 17:22
    assignment代写
    本文特别在这个现代计算机时代提供信息。 这篇文章中的最好的东西是作者的写作技巧,这是非常令人印象深刻的。 这些线条为我提供了有关机械及其用途的最佳想法。
    O(n)、O(1)和CFS调度器  发表时间:2018-03-21 01:39
    arham
    这篇文章是资料性的
    O(n)、O(1)和CFS调度器  发表时间:2018-03-21 01:35
    EE
    @EE:wowo,我找到答案了,会一直接着发直到超时
    蓝牙协议分析(7)_BLE连接有关的技术分析  发表时间:2018-03-16 21:10
    EE
    wowo,请问瞬时到来时,从机没有接到主机发过来的包(主机链路丢失)从机该怎么做了?是以新的链接间隔一直进行扫描窗吗,直到超时还是怎样了?
    蓝牙协议分析(7)_BLE连接有关的技术分析  发表时间:2018-03-15 14:20
    Jarson
    @Jarson:自问自答了,继续跟踪irq描述符分配代码 irq_alloc_desc_from 函数和 irq_domain_associate 函数,可知道 virq 也即IRQ number在内核空间是唯一的,而 hwirq 是与irq domain相关。简单来说,virq 值不会重复,而 hwirq 在不同的irq domain中可能相同。
    EE
    @wowo:1、如果如你所说,那加密模式设置就没有意思了,因为没加密也可以向从机发数据?! 2、spec上没找到 3、谢谢 加问一条:配对请求在链路层是用数据控制通道还是用数据通道了??
    蓝牙协议分析(10)_BLE安全机制之LE Encryption  发表时间:2018-03-13 17:51
    Jarson
    @Jarson:补充一个GPIO type中断控制器的中断处理函数,该函数在进一步处理GPIO中断时,也调用了generic_handle_irq函数,但传入的irq参数值为GPIO irq domain下的IRQ number。 static void gpio_irq_handler(unsigned irq, struct irq_desc *desc) { struct irq_chip *chip = irq_desc_get_chip(desc); struct irq_data *idata = irq_desc_get_irq_data(desc); struct at91_gpio_chip *at91_gpio = irq_data_get_irq_chip_data(idata); void __iomem *pio = at91_gpio->regbase; unsigned long isr; int n; chained_irq_enter(chip, desc); for (;;) { /* Reading ISR acks pending (edge triggered) GPIO interrupts. * When there none are pending, we're finished unless we need * to process multiple banks (like ID_PIOCDE on sam9263). */ isr = __raw_readl(pio + PIO_ISR) & __raw_readl(pio + PIO_IMR); if (!isr) { if (!at91_gpio->next) break; at91_gpio = at91_gpio->next; pio = at91_gpio->regbase; continue; } n = find_first_bit(&isr, BITS_PER_LONG); while (n < BITS_PER_LONG) { generic_handle_irq(irq_find_mapping(at91_gpio->domain, n)); n = find_next_bit(&isr, BITS_PER_LONG, n + 1); } } chained_irq_exit(chip, desc); /* now it may re-trigger */ }
    Jarson
    int generic_handle_irq(unsigned int irq) { struct irq_desc *desc = irq_to_desc(irq); ---通过IRQ number获取该irq的描述符 if (!desc) return -EINVAL; generic_handle_irq_desc(irq, desc);----调用high level的irq handler来处理该IRQ return 0; } 在获取irq描述符时,只有一个传入参数irq(IRQ number),考虑有级联中断控制器的情况,如何确保 irq_to_desc返回正确的irq描述符?irq_to_desc是如何知道所传入的IRQ number位于哪一个 irq domain?
    wowo
    @EE:1. 加密是以链路为单位的,所以如果断了之后,就不会拒绝非加密的LL_ENC_REQ请求。 2. 看看spec吧,我记得不太清楚。 3. 原则上可以很多,多的不用去考虑,但实际上会受到资源的限制。
    蓝牙协议分析(10)_BLE安全机制之LE Encryption  发表时间:2018-03-13 16:17

共7862条188/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 188189 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 307 308 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