ooonebook
    @ooonebook:通过arm-none-linux-gnueabi-objdump把uboot-spl反汇编出来看了一下,sp里的堆栈地址确实是有问题的 00000110 <_main>: 110: e59fd01c ldr sp, [pc, #28] ; 134 <_main+0x24> 114: e3cdd007 bic sp, sp, #7 118: e1a0000d mov r0, sp 11c: eb000012 bl 16c <board_init_f_alloc_reserve> 120: e1a0d000 mov sp, r0 124: e1a09000 mov r9, r0 128: eb000012 bl 178 <board_init_f_init_reserve> 12c: e3a00000 mov r0, #0 130: eb000009 bl 15c <board_init_f> 134: 20ffff40 rscscs pc, pc, r0, asr #30 110: e59fd01c ldr sp, [pc, #28] ; 134 <_main+0x24> 所以堆栈的地址是134: 20ffff40,这个确实是DRAM的地址,所以是有问题的。 但是从反汇编出来的文件中可以看出来,C函数可以正常的原因是因为没有汇编的过程中并没有被解析出push和pop指令: 0000015c <board_init_f>: 15c: e3a00001 mov r0, #1 160: eafffff4 b 138 <tiny210_early_debug> 00000164 <lowlevel_init>: 164: e3a00004 mov r0, #4 168: eafffff2 b 138 <tiny210_early_debug> 00000138 <tiny210_early_debug>: 138: e350000f cmp r0, #15 13c: c3a00000 movgt r0, #0 140: e59f3010 ldr r3, [pc, #16] ; 158 <tiny210_early_debug+0x20> 144: e3012111 movw r2, #4369 ; 0x1111 148: e1e00000 mvn r0, r0 14c: e5832280 str r2, [r3, #640] ; 0x280 150: e5830284 str r0, [r3, #644] ; 0x284 154: e12fff1e bx lr 158: e0200000 eor r0, r0, r0 并且反汇编出来的汇编文件中,都没有看到push和pop的指令,这也许就是sp设置错误但是还是可以正常调用C函数的原因吧。 不过我还是把CONFIG_SPL_STACK设置成正确的RAM地址比较靠谱吧。
    u-boot启动流程分析(2)_板级(board)部分  发表时间:2016-08-13 15:56
    ooonebook
    hi,wowo,目前开始移植uboot.bin了,然后看到sp的设置,想对比一下uboot.spl的堆栈设置,但是发现有个问题实在搞不清楚。 在之前uboot.spl中还没有移植DDR初始化代码的时候,就已经在board_init_f点亮LED了。 但是在arch/arm/lib/crt0.S中 73 #if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_STACK) 74 ldr sp, =(CONFIG_SPL_STACK) 75 #else 76 ldr sp, =(CONFIG_SYS_INIT_SP_ADDR) 77 #endif 但是其实我现在发现CONFIG_SPL_STACK我并没有配置,编译uboot-spl的时候,也确实是ldr sp, =(CONFIG_SYS_INIT_SP_ADDR),但是这个地址其实是在DRAM空间,也就是我还没初始化的那部分DDR的空间,理论上堆栈的使用应该会有问题才对,C函数应该也不能调用,但是为什么board_init_f却可以正常调用呢??? 这个问题昨天研究了一天了还是没搞清楚。 怎么去查这个堆栈地址呢?
    u-boot启动流程分析(2)_板级(board)部分  发表时间:2016-08-13 14:28
    fenghusthu
    @bubble:有可能其他cpu摘下的clock_event_device在这个cpu还可以再抢救一下
    Linux时间子系统之(十六):clockevent  发表时间:2016-08-13 11:53
    wowo
    @狼花1997:大致的过程,是:spi_add_device-->device_add,具体可以拔拔spi的代码: https://github.com/wowotechX/linux/blob/x_integration/drivers/spi/spi.c 刚好可以借助理解设备模型的概念~
    Linux设备模型(6)_Bus  发表时间:2016-08-12 21:58
    狼花1997
    我想问一下sys/bus/spi/devices/spi1.0 这个spi1.0 是如何注册得来的啊
    Linux设备模型(6)_Bus  发表时间:2016-08-12 20:12
    wowo
    @junjun:它的意思是,当调到各个driver的suspend_noirq时,系统的irq已经被disable了,你可以放心的做你想做的事情。 当然,什么事情需要在中断被disable的时候做,只有这个driver自己知道了。
    Linux电源管理(6)_Generic PM之Suspend功能  发表时间:2016-08-11 19:18
    junjun
    linux kernel documen文档devices.txt里有说"The suspend_noirq phase occurs after IRQ handlers have been disabled, ", 没有明白这里的IRQ handler怎么对应到我的platform_device上,我现在platform_driver的suspned_noirq会被调用到,但并没有相关的IRQ啊,当然也没有IRQ handler disable。求博主解惑啊,暂时还没有能力研究PM内部的代码。
    Linux电源管理(6)_Generic PM之Suspend功能  发表时间:2016-08-11 18:38
    wowo
    @hongxiaoh:假设combined_event_count是32bit wakeup events in progress和registered wakeup events各占16bit,即:wakeup events in progress | registered wakeup events. 注:上面有一个隐含的规则:registered wakeup events > wakeup events in progress(很重要,不然会有问题) 而MAX_IN_PROGRESS等于((1 << 16) - 1),即0xffff 那么combined_event_count + MAX_IN_PROGRESS = ? 假设combined_event_count=0x0 0001,则为0x1 0000 假设combined_event_count=0x5 0009,则为0x6 0008 实际上就利用了简单的进位操作~~~
    留言板  发表时间:2016-08-11 15:42
    hongxiaoh
    cec = atomic_add_return(MAX_IN_PROGRESS, &combined_event_count); wakeup events in progress减1,registered wakeup events加1 请问这个具体是怎么实现加减的?
    留言板  发表时间:2016-08-11 14:16
    mimolock
    @wowo:多谢了,我试试
    process credentials相关的用户空间文件  发表时间:2016-08-10 14:42

共7862条403/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 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 403404 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