Print this page
10568 bop_trap() should report %cr2

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/i86pc/os/fakebop.c
          +++ new/usr/src/uts/i86pc/os/fakebop.c
↓ open down ↓ 2009 lines elided ↑ open up ↑
2010 2010                  tf = (struct trapframe *)(tfp - 1);
2011 2011          else
2012 2012                  bop_printf(NULL, "error code           0x%lx\n",
2013 2013                      tf->error_code & 0xffffffff);
2014 2014  
2015 2015          bop_printf(NULL, "instruction pointer  0x%lx\n", tf->inst_ptr);
2016 2016          bop_printf(NULL, "code segment         0x%lx\n", tf->code_seg & 0xffff);
2017 2017          bop_printf(NULL, "flags register       0x%lx\n", tf->flags_reg);
2018 2018          bop_printf(NULL, "return %%rsp          0x%lx\n", tf->stk_ptr);
2019 2019          bop_printf(NULL, "return %%ss           0x%lx\n", tf->stk_seg & 0xffff);
     2020 +        bop_printf(NULL, "%%cr2                 0x%lx\n", getcr2());
2020 2021  
2021 2022          /* grab %[er]bp pushed by our code from the stack */
2022 2023          fakeframe.old_frame = (bop_frame_t *)*(tfp - 3);
2023 2024          fakeframe.retaddr = (pc_t)tf->inst_ptr;
2024 2025          bop_printf(NULL, "Attempting stack backtrace:\n");
2025 2026          bop_traceback(&fakeframe);
2026 2027          bop_panic("unexpected trap in early boot");
2027 2028  }
2028 2029  
2029 2030  extern void bop_trap_handler(void);
↓ open down ↓ 921 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX