Dear all,
I read the function init_idt_common(gate_desc_t *idt), it installs/registers
2 syscall handlers in kernel IDT table.
They are:
/*
* install "int80" handler at, well, 0x80.
*/
set_gatesegd(&idt0[T_INT80], &sys_int80, KCS_SEL, SDT_SYSIGT, SEL_UPL);
/*
* System call handler.
*/
#if defined(__amd64)
set_gatesegd(&idt[T_SYSCALLINT], &sys_syscall_int, KCS_SEL, SDT_SYSIGT,
SEL_UPL);
#elif defined(__i386)
set_gatesegd(&idt[T_SYSCALLINT], &sys_call, KCS_SEL, SDT_SYSIGT,
SEL_UPL);
#endif /* __i386 */
*Which one is the standard syscall handler in current opensolais ON?
The first handler will be triggered by "int 0x80", then what instruction
will trigger the second handler?*
And I find another piece of code in this function
/*
* Prepare interposing descriptors for the branded "int80"
* and syscall handlers and cache copies of the default
* descriptors.
*/
brand_tbl[0].ih_inum = T_INT80;
brand_tbl[0].ih_default_desc = idt0[T_INT80];
set_gatesegd(&(brand_tbl[0].ih_interp_desc), &brand_sys_int80, KCS_SEL,
SDT_SYSIGT, SEL_UPL);
brand_tbl[1].ih_inum = T_SYSCALLINT;
brand_tbl[1].ih_default_desc = idt0[T_SYSCALLINT];
#if defined(__amd64)
set_gatesegd(&(brand_tbl[1].ih_interp_desc), &brand_sys_syscall_int,
KCS_SEL, SDT_SYSIGT, SEL_UPL);
#elif defined(__i386)
set_gatesegd(&(brand_tbl[1].ih_interp_desc), &brand_sys_call,
KCS_SEL, SDT_SYSIGT, SEL_UPL);
#endif /* __i386 */
brand_tbl[2].ih_inum = 0;
*Any new features about the branded "int $80" and syscall handlers?
Do these 2 branded handlers put into use in opensolairs ON now?*
P.S. I'm using and reading B74 now.
Kind Regards,
TJ
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code