Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

vmlinux on sx551 weirdiness

By: Lekensteyn on Mar 27th, 2012  |  syntax: None  |  size: 3.12 KB  |  views: 50  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Actual result:
  2. [    0.000000] Linux version 2.6.37.6 (peter@penguin) (gcc version 4.6.3 20120201 (prerelease) (Linaro GCC 4.6-2012.02) ) #12 Tue Mar 27 23:09:00 CEST 2012
  3. [    0.000000] bootconsole [early0] enabled
  4. [    0.000000] CPU revision is: 00018448 (MIPS 4KEc)
  5. [    0.000000] TI AR7 (TNETD7300), ID: 0x0005, Revision: 0x26
  6. [    0.000000] Determined physical RAM map:
  7. [    0.000000]  memory: 02000000 @ 14000000 (usable)
  8. [    0.000000] end of print_memory_map
  9. [    0.000000] After print_memory_map
  10. [    0.000000] boot_command_line 9428cca8 builtin_cmdline ffffff21 COMMAND_LINE_SIZE 4096
  11.  
  12. Expected:
  13. [    0.000000] boot_command_line 9428cca8 builtin_cmdline 9428ff20 COMMAND_LINE_SIZE 4096
  14.  
  15.  
  16. Modified source from http://lxr.linux.no/#linux+v2.6.37.6/arch/mips/kernel/setup.c#L463
  17.         pr_info("Determined physical RAM map:\n");
  18.         print_memory_map();
  19.  
  20.         pr_info("After print_memory_map\n");
  21. #ifdef CONFIG_CMDLINE_BOOL
  22.         pr_info("boot_command_line %p builtin_cmdline %p COMMAND_LINE_SIZE %zu\n", boot_command_line, builtin_cmdline, COMMAND_LINE_SIZE);
  23.         pr_info("builtin_cmdline[0] = %c\n", builtin_cmdline[0]);
  24. #ifdef CONFIG_CMDLINE_OVERRIDE
  25.         strlcpy(boot_command_line, builtin_cmdline, COMMAND_LINE_SIZE);
  26. #else
  27.         if (builtin_cmdline[0]) {
  28.                 pr_info("before first strlcat\n");
  29.                 strlcat(arcs_cmdline, " ", COMMAND_LINE_SIZE);
  30.                 pr_info("Before second strlcat\n");
  31.                 strlcat(arcs_cmdline, builtin_cmdline, COMMAND_LINE_SIZE);
  32.         }  
  33.         pr_info("Before strlcpy\n");
  34.         strlcpy(boot_command_line, arcs_cmdline, COMMAND_LINE_SIZE);
  35. #endif
  36.         pr_info("%s", boot_command_line);
  37. #else
  38.         strlcpy(boot_command_line, arcs_cmdline, COMMAND_LINE_SIZE);
  39. #endif
  40.         pr_info("Before boot_command_line strlcpy\n");
  41.         strlcpy(command_line, boot_command_line, COMMAND_LINE_SIZE);
  42.  
  43.  
  44. Assembly
  45. ; pr_info("Determined physical RAM map:\n");
  46. 9427515c:       3c049423        lui     a0,0x9423
  47. 94275160:       0d0860f5        jal     0x942183d4
  48. 94275164:       2484021c        addiu   a0,a0,540
  49.  
  50. ; print_memory_map();
  51. 94275168:       0d09d3ad        jal     0x94274eb4      ; print_memory_map
  52. 9427516c:       00000000        nop    
  53.  
  54. ; pr_info("After print_memory_map\n");
  55. 94275170:       3c049423        lui     a0,0x9423
  56. 94275174:       0d0860f5        jal     0x942183d4      ; printk
  57. 94275178:       24840240        addiu   a0,a0,576       ; "<6>After print_memory_map\n"
  58.  
  59. ; pr_info("boot_command_line %p builtin_cmdline %p COMMAND_LINE_SIZE %zu\n", boot_command_line, builtin_cmdline, COMMAND_LINE_SIZE);
  60. 9427517c:       3c049423        lui     a0,0x9423
  61. 94275180:       2484025c        addiu   a0,a0,604       ; "<6>boot_command_line %p builtin_cmdline %p COMMAND_LINE_SIZE %zu\n"
  62. 94275184:       2625cca8        addiu   a1,s1,-13144    ; 0x9428cca8 allocated memory for use
  63. 94275188:       2606ff20        addiu   a2,s0,-224      ; 0x9428ff20 "console=ttyS0,115200 console=ttyS1,115200"
  64. 9427518c:       0d0860f5        jal     0x942183d4      ; printk
  65. 94275190:       24071000        li      a3,4096         ; 4096
clone this paste RAW Paste Data