From mboxrd@z Thu Jan 1 00:00:00 1970 From: nicowisamu Subject: consoleio_read in domU Date: Wed, 8 Feb 2006 18:02:33 +0900 Message-ID: <78f173a00602080102u9d63153v@mail.gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1134834523==" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Mime-version: 1.0 Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --===============1134834523== Content-Type: multipart/alternative; boundary="----=_Part_3669_17854200.1139389353660" ------=_Part_3669_17854200.1139389353660 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hello, I have ported a kernel named toppers on xen as domU using mini-os libraries= . This OS use serial link for display and input. For printing messages I use the hypercall console_io with the consolio_writ= e parameter. For reading the console input I wanted to use the same hypercall with consolio_read parameter. But I don't well understand how console sharing works on xen. Because, In order to call this function I need first an event from event channel. So, on initializing, I bind VIRQ_CONSOLE with my handler and then I use the hypercall to get the message on my buffer. But the handler is never called. How should I proceed ? my initialize function where I have replaced the serial initialize by a bind_virq : void serial_initialize(VP_INT portid) { static char buf[]=3D"Initializing serial interface"; static char buf2[]=3D" OK\n"; (void)HYPERVISOR_console_io(CONSOLEIO_write,strlen(buf), buf); bind_virq(VIRQ_CONSOLE, &serial_handler); (void)HYPERVISOR_console_io(CONSOLEIO_write,strlen(buf2), buf2); } my handler which prints something if it is called : void serial_handler(void) { //hw_serial_handler(); static char buf[]=3D"character received"; (void)HYPERVISOR_console_io(CONSOLEIO_write,strlen(buf), buf); } could someone help me please ? ------=_Part_3669_17854200.1139389353660 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hello,
I have ported a kernel named toppers on xen as domU using mini-os libraries= .
This OS use serial link for display and input.
For printing messages I use the hypercall console_io with the consolio_writ= e parameter.
For reading the console input I wanted to use the same hypercall with conso= lio_read parameter.
But I don't well understand how console sharing works on xen. Because, In o= rder to call this function I need first
an event from event channel. So, on initializing, I bind VIRQ_CONSOLE with = my handler and then I use the
hypercall to get the message on my buffer. But the handler is never called.= How should I proceed ?

my initialize function where I have replaced the serial initialize by a bin= d_virq :

void
serial_initialize(VP_INT portid)
{
static char buf[]=3D"Initializing serial interface";
    static char buf2[]=3D" OK\n";
(void)HYPERVISOR_console_io(CONSOLEIO_write,strlen(buf), buf);
    bind_virq(VIRQ_CONSOLE, &serial_handler);
    (void)HYPERVISOR_console_io(CONSOLEIO_write,strlen(buf2)= , buf2);
}

my handler which prints something if it is called :

void
serial_handler(void)
{
    //hw_serial_handler();
    static char buf[]=3D"character received";
    (void)HYPERVISOR_console_io(CONSOLEIO_write,strlen(buf),= buf);
}



could someone help me please ?
------=_Part_3669_17854200.1139389353660-- --===============1134834523== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --===============1134834523==--