Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save doug65536/dcf6e43c6a29e94de50aca63ddaeed93 to your computer and use it in GitHub Desktop.
Save doug65536/dcf6e43c6a29e94de50aca63ddaeed93 to your computer and use it in GitHub Desktop.
char const *pci_describe_device(uint8_t cls, uint8_t sc, uint8_t pif)
{
4f6: 55 push %rbp
4f7: 48 89 e5 mov %rsp,%rbp
4fa: 48 83 ec 10 sub $0x10,%rsp
4fe: 89 f1 mov %esi,%ecx
500: 89 d0 mov %edx,%eax
502: 89 fa mov %edi,%edx
504: 88 55 fc mov %dl,-0x4(%rbp)
507: 89 ca mov %ecx,%edx
509: 88 55 f8 mov %dl,-0x8(%rbp)
50c: 88 45 f4 mov %al,-0xc(%rbp)
switch (cls) {
50f: 0f b6 45 fc movzbl -0x4(%rbp),%eax
513: 83 f8 40 cmp $0x40,%eax
516: 7f 1d jg 535 <_Z19pci_describe_devicehhh+0x3f>
518: 85 c0 test %eax,%eax
51a: 0f 88 09 0b 00 00 js 1029 <_Z19pci_describe_devicehhh+0xb33>
520: 83 f8 40 cmp $0x40,%eax
523: 0f 87 00 0b 00 00 ja 1029 <_Z19pci_describe_devicehhh+0xb33>
529: 89 c0 mov %eax,%eax
52b: 48 8b 04 c5 00 00 00 mov 0x0(,%rax,8),%rax
532: 00
52f: R_X86_64_32S .rodata+0xc90 <------------ truncated to fit
533: ff e0 jmpq *%rax
LOAD obj/arch/x86_64/pci_arch.o
LOAD obj/arch/x86_64/portio.o
LOAD obj/arch/pci.o
LOAD obj/dispi.o
LOAD obj/assert.o
LOAD obj/debug.o
LOAD obj/main.o
LOAD obj/arch/x86_64/entry.o
0x00000000ffe00000 . = 0xffe00000
/DISCARD/
*(.note.gnu.build-id)
*(.eh_frame)
.entry 0x00000000fffffff0 0x10
*(.text.entry)
.text.entry 0x00000000fffffff0 0x3 obj/arch/x86_64/entry.o
0x0000000000000010 . = 0x10
*fill* 0x00000000fffffff3 0xd
.text.early 0x00000000ffff0000 0x1000
*(.text.early)
.text.early 0x00000000ffff0000 0x81 obj/arch/x86_64/entry.o
0x00000000ffff1000 . = ALIGN (0x1000)
*fill* 0x00000000ffff0081 0xf7f
.rodata.early 0x00000000ffff1000 0x1000
*(.rodata.early)
.rodata.early 0x00000000ffff1000 0x20 obj/arch/x86_64/entry.o
0x00000000ffff2000 . = ALIGN (0x1000)
*fill* 0x00000000ffff1020 0xfe0 00000000
.rodata 0x00000000ffe00000 0x2000
*(.rodata)
.rodata 0x00000000ffe00000 0x13c8 obj/arch/pci.o <-------- here ----------
.rodata 0x00000000ffe013c8 0x4a obj/dispi.o
.rodata 0x00000000ffe01412 0x1e obj/assert.o
.rodata 0x00000000ffe01430 0xd8 obj/debug.o
0x00000000ffe01430 hexlookup
.rodata 0x00000000ffe01508 0x51 obj/main.o
*(.rodata.*)
// --->8----- snip
.text 0x00000000ffe02000 0x3000
*(.text)
.text 0x00000000ffe02000 0xaa obj/arch/x86_64/pci_arch.o
0x00000000ffe02000 arch_mmio_range
0x00000000ffe02010 arch_pci_read
0x00000000ffe0205d arch_pci_write
.text 0x00000000ffe020aa 0x2e obj/arch/x86_64/portio.o
0x00000000ffe020aa arch_debug_char
0x00000000ffe020d1 arch_halt
.text 0x00000000ffe020d8 0x1030 obj/arch/pci.o
0x00000000ffe020d8 pci_read
0x00000000ffe021cd pci_write
0x00000000ffe02338 _Z8set_barsRK8pci_addrRjjS2_Pj
0x00000000ffe025ce _Z19pci_describe_devicehhh <--------here -------------
.text 0x00000000ffe03108 0x527 obj/dispi.o
0x00000000ffe03108 _Z10dispi_initmmm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment