iPXE
Functions
dumpregs.c File Reference
#include <stdio.h>
#include <realmode.h>

Go to the source code of this file.

Functions

void __asmcall _dump_regs (struct i386_all_regs *ix86)
 

Function Documentation

◆ _dump_regs()

void __asmcall _dump_regs ( struct i386_all_regs ix86)

Definition at line 4 of file dumpregs.c.

4  {
5 
7  TEXT16_CODE ( ".globl dump_regs\n\t"
8  "\ndump_regs:\n\t"
10  "ret\n\t" ) : );
11 
12  printf ( "EAX=%08x EBX=%08x ECX=%08x EDX=%08x\n"
13  "ESI=%08x EDI=%08x EBP=%08x ESP=%08x\n"
14  "CS=%04x SS=%04x DS=%04x ES=%04x FS=%04x GS=%04x\n",
15  ix86->regs.eax, ix86->regs.ebx, ix86->regs.ecx,
16  ix86->regs.edx, ix86->regs.esi, ix86->regs.edi,
17  ix86->regs.ebp, ix86->regs.esp,
18  ix86->segs.cs, ix86->segs.ss, ix86->segs.ds,
19  ix86->segs.es, ix86->segs.fs, ix86->segs.gs );
20 }
struct i386_seg_regs segs
Definition: registers.h:175
uint32_t ebp
Definition: registers.h:73
int printf(const char *fmt,...)
Write a formatted string to the console.
Definition: vsprintf.c:464
uint32_t esp
Definition: registers.h:77
#define VIRT_CALL(function)
Call C function from real-mode code.
Definition: librm.h:78
uint16_t es
Definition: registers.h:142
uint16_t cs
Definition: registers.h:139
uint16_t fs
Definition: registers.h:143
uint32_t eax
Definition: registers.h:109
void __asmcall _dump_regs(struct i386_all_regs *ix86)
Definition: dumpregs.c:4
uint32_t edi
Definition: registers.h:65
uint32_t esi
Definition: registers.h:69
struct i386_regs regs
Definition: registers.h:176
uint16_t ds
Definition: registers.h:141
uint16_t ss
Definition: registers.h:140
uint32_t ecx
Definition: registers.h:101
__asm__ __volatile__("\n1:\n\t" "movb -1(%2,%1), %%al\n\t" "stosb\n\t" "loop 1b\n\t" "xorl %%eax, %%eax\n\t" "mov %3, %1\n\t" "rep stosb\n\t" :"=&D"(discard_D), "=&c"(discard_c) :"r"(data), "g"(pad_len), "0"(value0), "1"(len) :"eax")
__asm__(".section \".rodata\", \"a\", " PROGBITS "\n\t" "\nprivate_key_data:\n\t" ".size private_key_data, ( . - private_key_data )\n\t" ".equ private_key_len, ( . - private_key_data )\n\t" ".previous\n\t")
uint16_t gs
Definition: registers.h:144
uint32_t ebx
Definition: registers.h:85
uint32_t edx
Definition: registers.h:93
#define TEXT16_CODE(asm_code_str)
Definition: libkir.h:217

References __asm__(), __volatile__(), i386_seg_regs::cs, i386_seg_regs::ds, i386_regs::eax, i386_regs::ebp, i386_regs::ebx, i386_regs::ecx, i386_regs::edi, i386_regs::edx, i386_seg_regs::es, i386_regs::esi, i386_regs::esp, i386_seg_regs::fs, i386_seg_regs::gs, printf(), i386_all_regs::regs, i386_all_regs::segs, i386_seg_regs::ss, TEXT16_CODE, and VIRT_CALL.