Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
HP X2 210 tablet (UEFI) hang
2016-02-04, 16:02
Post: #10
RE: HP X2 210 tablet (UEFI) hang
(2016-02-04 15:47)SebastianRoth Wrote:  I tried to print things like addresses but failed because efi_printk can only print strings and I was unable to format integers to print with efi_char16_printk. snprintf does not seam to be usable within that early kernel code ("undefined reference to `sprintf'"). I am still quite new to the world of kernel debugging. How would I do this?

In the worst case, you can always brute-force it. Create a hideous hack of a function doing something like:

Code:
hideous_hack ( uint64_t value ) {
  static const char digits[16] = "0123456789abcdef";
  char buf[17];
  unsigned int i;

  for ( i = 0 ; i < 16 ; i++ )
    buf[i] = digits[ ( value >> ( 4 * ( 15 - i ) ) ) & 15 ];
  buf[16] = '\0';
  efi_printk ( sys_table, buf );
}

This untested code almost certainly has bugs, but it should give you the general idea.

Michael
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: HP X2 210 tablet (UEFI) hang - mcb30 - 2016-02-04 16:02



User(s) browsing this thread: 1 Guest(s)