Changeset 247 for trunk/hal/x86_64/drivers/txt_rs232.c
- Timestamp:
- Jul 20, 2017, 1:04:15 PM (7 years ago)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/hal/x86_64/drivers/txt_rs232.c
r244 r247 1 1 /* 2 * soclib_tty.c - soclib tty driver implementation.2 * txt_rs232.c - RS232 driver implementation 3 3 * 4 * Author Alain Greiner (2016)4 * Copyright (c) 2017 Maxime Villard 5 5 * 6 * Copyright (c) UPMC Sorbonne Universites6 * This file is part of ALMOS-MKH. 7 7 * 8 * This file is part of ALMOS-MKH.. 9 * 10 * ALMOS-MKH. is free software; you can redistribute it and/or modify it 8 * ALMOS-MKH is free software; you can redistribute it and/or modify it 11 9 * under the terms of the GNU General Public License as published by 12 10 * the Free Software Foundation; version 2.0 of the License. 13 11 * 14 * ALMOS-MKH .is distributed in the hope that it will be useful, but12 * ALMOS-MKH is distributed in the hope that it will be useful, but 15 13 * WITHOUT ANY WARRANTY; without even the implied warranty of 16 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU … … 18 16 * 19 17 * You should have received a copy of the GNU General Public License 20 * along with ALMOS-MKH .; if not, write to the Free Software Foundation,18 * along with ALMOS-MKH; if not, write to the Free Software Foundation, 21 19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 22 20 */ … … 24 22 #include <dev_txt.h> 25 23 #include <chdev.h> 26 #include < soclib_tty.h>24 #include <txt_rs232.h> 27 25 #include <remote_spinlock.h> 28 26 #include <thread.h> … … 31 29 #include <hal_internal.h> // XXX 32 30 33 void soclib_tty_init( chdev_t * chdev)31 void txt_rs232_init(chdev_t *chdev) 34 32 { 35 chdev->cmd = & soclib_tty_cmd;36 chdev->isr = & soclib_tty_isr;33 chdev->cmd = &txt_rs232_cmd; 34 chdev->isr = &txt_rs232_isr; 37 35 38 36 // nothing to do … … 41 39 // Pour le write: tout en sync, ça part direct sur le VGA/série 42 40 // Pour le read: là on attend l'ISR 43 void __attribute__ ((noinline)) soclib_tty_cmd( xptr_t th_xp)41 void txt_rs232_cmd(xptr_t th_xp) 44 42 { 45 43 // get client thread cluster and local pointer … … 55 53 chdev_t * dev_ptr = (chdev_t *)GET_PTR( dev_xp ); 56 54 57 // get extended pointer on SOCLIB_TTYbase segment55 // get extended pointer on base segment 58 56 xptr_t tty_xp = (xptr_t)hal_remote_lwd( XPTR( dev_cxy , &dev_ptr->base ) ); 59 57 60 // get SOCLIB_TTYbase segment cluster and local pointer58 // get base segment cluster and local pointer 61 59 cxy_t tty_cxy = GET_CXY( tty_xp ); 62 60 uint32_t * tty_ptr = (uint32_t *)GET_PTR( tty_xp ); … … 94 92 } 95 93 96 void __attribute__ ((noinline)) soclib_tty_isr( chdev_t * chdev)94 void txt_rs232_isr(chdev_t *chdev) 97 95 { 98 96 // Cette ISR est juste utile pour le clavier; on arrive ici quand une touche 99 97 // est pressée 100 x86_panic(" soclib_tty_isr not handled");98 x86_panic("txt_rs232_isr not handled"); 101 99 } 102 100
Note: See TracChangeset
for help on using the changeset viewer.