really revert endpoint_t -> int
debugging info on panic: decode segment selectors and descriptors, now moved to arch-specific part, prototypes added; sanity checking in debug.h made optional with vmassert().
This commit is contained in:
@@ -37,6 +37,7 @@ PRIVATE int nfreepdes = 0, freepdes[WANT_FREEPDES], inusepde = NOPDE;
|
||||
|
||||
FORWARD _PROTOTYPE( u32_t phys_get32, (vir_bytes v) );
|
||||
FORWARD _PROTOTYPE( void vm_enable_paging, (void) );
|
||||
FORWARD _PROTOTYPE( void set_cr3, (void) );
|
||||
|
||||
|
||||
/* *** Internal VM Functions *** */
|
||||
|
||||
@@ -84,6 +84,7 @@ _PROTOTYPE( void phys_memset, (phys_bytes ph, u32_t c, phys_bytes bytes) );
|
||||
|
||||
/* protect.c */
|
||||
_PROTOTYPE( void prot_init, (void) );
|
||||
_PROTOTYPE( void idt_init, (void) );
|
||||
_PROTOTYPE( void init_codeseg, (struct segdesc_s *segdp, phys_bytes base,
|
||||
vir_bytes size, int privilege) );
|
||||
_PROTOTYPE( void init_dataseg, (struct segdesc_s *segdp, phys_bytes base,
|
||||
@@ -91,6 +92,9 @@ _PROTOTYPE( void init_dataseg, (struct segdesc_s *segdp, phys_bytes base,
|
||||
_PROTOTYPE( void enable_iop, (struct proc *pp) );
|
||||
_PROTOTYPE( int prot_set_kern_seg_limit, (vir_bytes limit) );
|
||||
_PROTOTYPE( void printseg, (char *banner, int iscs, struct proc *pr, u32_t selector) );
|
||||
_PROTOTYPE( u32_t, read_cs(void));
|
||||
_PROTOTYPE( u32_t, read_ds(void));
|
||||
_PROTOTYPE( u32_t, read_ss(void));
|
||||
|
||||
/* prototype of an interrupt vector table entry */
|
||||
struct gate_table_s {
|
||||
|
||||
@@ -30,6 +30,17 @@ PUBLIC void arch_shutdown(int how)
|
||||
/* Mask all interrupts, including the clock. */
|
||||
outb( INT_CTLMASK, ~0);
|
||||
|
||||
if(minix_panicing) {
|
||||
/* We're panicing? Then retrieve and decode currently
|
||||
* loaded segment selectors.
|
||||
*/
|
||||
printseg("cs: ", 1, proc_ptr, read_cs());
|
||||
printseg("ds: ", 0, proc_ptr, read_ds());
|
||||
if(read_ds() != read_ss()) {
|
||||
printseg("ss: ", 0, NULL, read_ss());
|
||||
}
|
||||
}
|
||||
|
||||
if(how != RBT_RESET) {
|
||||
/* return to boot monitor */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user