LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-11-2017, 01:38 AM   #1
poplinux
Member
 
Registered: May 2012
Posts: 111

Rep: Reputation: Disabled
How can start debug that on U-boot


Dear Sir.

This time, I got a panic on u-boot.

But, I don't know that "How to debug this error".

panic message is see below.

Code:
U-Boot 2016.05-rc3 (Jan 11 2017 - 16:09:06 +0900)

CPU: x86_64, vendor Intel, device 406d8h
DRAM:  4 GiB
Using default environment

Video: No video mode configured in coreboot!
Model: Intel Mohon Peak CRB
General Protection
EIP: 0010:[<7fc05426>] EFLAGS: 00010002
Original EIP :[<01110426>]
EAX: 00000000 EBX: 7fc59078 ECX: 00000004 EDX: 7fc05778
ESI: 7fc59020 EDI: 7eaf5000 EBP: 01110015 ESP: 7fa01434
 DS: 0018 ES: 0018 FS: 0020 GS: 0018 SS: 0018
CR0: 00000033 CR2: 00000000 CR3: 00000000 CR4: 00000600
DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
DR6: ffff0ff0 DR7: 00000400
Stack:
    0x7fa01474 : 0x01163f60
    0x7fa01470 : 0x01163ff4
    0x7fa0146c : 0x7fc14f94
    0x7fa01468 : 0x00000000
    0x7fa01464 : 0x01163f60
    0x7fa01460 : 0x01163ff4
    0x7fa0145c : 0x7fc3853e
    0x7fa01458 : 0x01110015
    0x7fa01454 : 0x7eaf5000
    0x7fa01450 : 0x7fc59020
    0x7fa0144c : 0x7fa04430
    0x7fa01448 : 0x7fc503f6
    0x7fa01444 : 0x7fa0154c
    0x7fa01440 : 0x7fc503fc
    0x7fa0143c : 0x00000246
    0x7fa01438 : 0x00000010
--->0x7fa01434 : 0x7fc051b3
    0x7fa01430 : 0x00010002
    0x7fa0142c : 0x00000010
    0x7fa01428 : 0x7fc05426
### ERROR ### Please RESET the board ###

I try to search "0x7fa01434" from System.map. But can't found.


Please advise to me.

Thank you.
 
Old 01-13-2017, 12:54 PM   #2
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,354
Blog Entries: 13

Rep: Reputation: 4411Reputation: 4411Reputation: 4411Reputation: 4411Reputation: 4411Reputation: 4411Reputation: 4411Reputation: 4411Reputation: 4411Reputation: 4411Reputation: 4411
The only way I've done debug for a bootloader in Linux is to use printk() calls everywhere and added code to save information in variables, thus adding to what I debug.

Simplify it all, remove sections, verify how far you get and then start adding a microscope, which is to say adding printk() and variable values to debug.

An example is, say it has to do the following:
Step 1
Step 2
Step 3
Step 4
Step 5
Done

You know it crashes.

By output information you know it does Step 1.

You have no idea if it does Step 2, 3, 4, or 5 because there normally is no debug.

So add prink() to each step "Here 2!", "Here 3", and so forth. Now you've figured out how far it gets before it panics.

Now slice up the step it panics within. For instance, you see it using an address register. Print out that address, verify it is a good address and that it contains what you expect. I.e. print out this information.

If you can't even get to those printk() statements, then it died before then.

Just some suggestions, I know it's frustrating.

I once tried kdb and it never worked. Ended up working at a shop where they specialized in boot code and BIOS and what they did was a lot of printk() as well as caused values or outputs to occur on certain interfaces. I.e. if you have access to a GPIO, then swap the state of the output depending on how you progress through your program.

When you build your code, take out all optimizations. Read the compiler and linker to determine how to output symbols and mixed source/assembly listing files.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
gdb, debug with separate debug file and different source dir problem a4z Programming 5 10-17-2014 01:55 AM
DHCPD will start in debug but will not start as a normal service jwsnl Linux - Server 3 06-07-2010 06:47 AM
Remove boot debug FCustom Linux - General 9 05-09-2007 04:35 AM
Debug info by inet1 during boot BroX Slackware 4 09-24-2006 10:59 AM
How to Debug Linux Kernel Boot process kushalkoolwal Linux - Kernel 4 06-22-2006 06:30 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:31 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration