Subversion Repositories HelenOS

Rev

Rev 3386 | Rev 4263 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3386 Rev 4153
Line 25... Line 25...
25
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
 */
27
 */
28
 
28
 
29
/** @addtogroup klog KLog
29
/** @addtogroup klog KLog
30
 * @brief   HelenOS KLog
30
 * @brief HelenOS KLog
31
 * @{
31
 * @{
32
 */
32
 */
33
/**
33
/**
34
 * @file
34
 * @file
35
 */
35
 */
36
 
36
 
37
#include <stdio.h>
37
#include <stdio.h>
Line 48... Line 48...
48
#define KLOG_SIZE PAGE_SIZE
48
#define KLOG_SIZE PAGE_SIZE
49
 
49
 
50
/* Pointer to klog area */
50
/* Pointer to klog area */
51
static char *klog;
51
static char *klog;
52
 
52
 
53
static void console_wait(void)
-
 
54
{
-
 
55
    while (get_cons_phone() < 0)
-
 
56
        usleep(50000);  // FIXME
-
 
57
}
-
 
58
 
-
 
59
static void interrupt_received(ipc_callid_t callid, ipc_call_t *call)
53
static void interrupt_received(ipc_callid_t callid, ipc_call_t *call)
60
{
54
{
61
    async_serialize_start();
55
    async_serialize_start();
62
   
56
   
63
    size_t klog_start = (size_t) IPC_GET_ARG1(*call);
57
    size_t klog_start = (size_t) IPC_GET_ARG1(*call);
Line 84... Line 78...
84
        SERVICE_MEM_KLOG);
78
        SERVICE_MEM_KLOG);
85
    if (res != EOK) {
79
    if (res != EOK) {
86
        printf(NAME ": Error initializing memory area\n");
80
        printf(NAME ": Error initializing memory area\n");
87
        return -1;
81
        return -1;
88
    }
82
    }
89
 
83
   
90
    int inr = sysinfo_value("klog.inr");
84
//  int inr = sysinfo_value("klog.inr");
91
    int devno = sysinfo_value("klog.devno");
-
 
92
    if (ipc_register_irq(inr, devno, 0, NULL) != EOK) {
85
//  if (ipc_register_irq(inr, devno, 0, NULL) != EOK) {
93
        printf(NAME ": Error registering klog notifications\n");
86
//      printf(NAME ": Error registering klog notifications\n");
94
        return -1;
87
//      return -1;
95
    }
88
//  }
96
   
89
   
97
    async_set_interrupt_received(interrupt_received);
90
    async_set_interrupt_received(interrupt_received);
98
    klog_update();
91
    klog_update();
99
    async_manager();
92
    async_manager();
100
 
93