Changed to use sys_readbios to get screen parameters. Added safecopy version
to get log messages.
This commit is contained in:
parent
a3fce7ce8d
commit
ee09d50403
3 changed files with 32 additions and 8 deletions
|
@ -938,14 +938,14 @@ tty_t *tp;
|
|||
if (! vdu_initialized++) {
|
||||
|
||||
/* How about error checking? What to do on failure??? */
|
||||
s=sys_vircopy(SELF, BIOS_SEG, (vir_bytes) VDU_SCREEN_COLS_ADDR,
|
||||
SELF, D, (vir_bytes) &bios_columns, VDU_SCREEN_COLS_SIZE);
|
||||
s=sys_vircopy(SELF, BIOS_SEG, (vir_bytes) VDU_CRT_BASE_ADDR,
|
||||
SELF, D, (vir_bytes) &bios_crtbase, VDU_CRT_BASE_SIZE);
|
||||
s=sys_vircopy(SELF, BIOS_SEG, (vir_bytes) VDU_SCREEN_ROWS_ADDR,
|
||||
SELF, D, (vir_bytes) &bios_rows, VDU_SCREEN_ROWS_SIZE);
|
||||
s=sys_vircopy(SELF, BIOS_SEG, (vir_bytes) VDU_FONTLINES_ADDR,
|
||||
SELF, D, (vir_bytes) &bios_fontlines, VDU_FONTLINES_SIZE);
|
||||
s=sys_readbios(VDU_SCREEN_COLS_ADDR, &bios_columns,
|
||||
VDU_SCREEN_COLS_SIZE);
|
||||
s=sys_readbios(VDU_CRT_BASE_ADDR, &bios_crtbase,
|
||||
VDU_CRT_BASE_SIZE);
|
||||
s=sys_readbios( VDU_SCREEN_ROWS_ADDR, &bios_rows,
|
||||
VDU_SCREEN_ROWS_SIZE);
|
||||
s=sys_readbios(VDU_FONTLINES_ADDR, &bios_fontlines,
|
||||
VDU_FONTLINES_SIZE);
|
||||
|
||||
vid_port = bios_crtbase;
|
||||
scr_width = bios_columns;
|
||||
|
@ -1130,6 +1130,26 @@ message *m_ptr; /* pointer to request message */
|
|||
send(m_ptr->m_source, m_ptr);
|
||||
}
|
||||
|
||||
/*===========================================================================*
|
||||
* do_get_kmess_s *
|
||||
*===========================================================================*/
|
||||
PUBLIC void do_get_kmess_s(m_ptr)
|
||||
message *m_ptr; /* pointer to request message */
|
||||
{
|
||||
/* Provide the log device with debug output */
|
||||
cp_grant_id_t gid;
|
||||
int r;
|
||||
|
||||
gid = m_ptr->GETKM_GRANT;
|
||||
r= OK;
|
||||
if (sys_safecopyto(m_ptr->m_source, gid, 0, (vir_bytes)&kmess, sizeof(kmess),
|
||||
D) != OK) {
|
||||
r = EFAULT;
|
||||
}
|
||||
m_ptr->m_type = r;
|
||||
send(m_ptr->m_source, m_ptr);
|
||||
}
|
||||
|
||||
/*===========================================================================*
|
||||
* cons_putk *
|
||||
*===========================================================================*/
|
||||
|
|
|
@ -221,6 +221,9 @@ PUBLIC void main(void)
|
|||
case GET_KMESS:
|
||||
do_get_kmess(&tty_mess);
|
||||
continue;
|
||||
case GET_KMESS_S:
|
||||
do_get_kmess_s(&tty_mess);
|
||||
continue;
|
||||
case FKEY_CONTROL: /* (un)register a fkey observer */
|
||||
do_fkey_ctl(&tty_mess);
|
||||
continue;
|
||||
|
|
|
@ -173,6 +173,7 @@ _PROTOTYPE( void cons_stop, (void) );
|
|||
_PROTOTYPE( void do_new_kmess, (message *m) );
|
||||
_PROTOTYPE( void do_diagnostics, (message *m, int safe) );
|
||||
_PROTOTYPE( void do_get_kmess, (message *m) );
|
||||
_PROTOTYPE( void do_get_kmess_s, (message *m) );
|
||||
_PROTOTYPE( void scr_init, (struct tty *tp) );
|
||||
_PROTOTYPE( void toggle_scroll, (void) );
|
||||
_PROTOTYPE( int con_loadfont, (message *m) );
|
||||
|
|
Loading…
Reference in a new issue