Subversion Repositories HelenOS

Rev

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

Rev 4221 Rev 4296
Line 29... Line 29...
29
/** @addtogroup sparc64
29
/** @addtogroup sparc64
30
 * @{
30
 * @{
31
 */
31
 */
32
/**
32
/**
33
 * @file
33
 * @file
34
 * @brief   SGCN driver.
34
 * @brief SGCN driver.
35
 */
35
 */
36
 
36
 
37
#include <arch.h>
37
#include <arch.h>
38
#include <arch/drivers/sgcn.h>
38
#include <arch/drivers/sgcn.h>
39
#include <arch/drivers/kbd.h>
39
#include <arch/drivers/kbd.h>
Line 205... Line 205...
205
    if (initialized)
205
    if (initialized)
206
        return;
206
        return;
207
 
207
 
208
    init_sram_begin();
208
    init_sram_begin();
209
       
209
       
210
    ASSERT(strcmp(SRAM_TOC->magic, SRAM_TOC_MAGIC) == 0);
210
    ASSERT(str_cmp(SRAM_TOC->magic, SRAM_TOC_MAGIC) == 0);
211
   
211
   
212
    /* lookup TOC entry with the correct key */
212
    /* lookup TOC entry with the correct key */
213
    uint32_t i;
213
    uint32_t i;
214
    for (i = 0; i < MAX_TOC_ENTRIES; i++) {
214
    for (i = 0; i < MAX_TOC_ENTRIES; i++) {
215
        if (strcmp(SRAM_TOC->keys[i].key, CONSOLE_KEY) == 0)
215
        if (str_cmp(SRAM_TOC->keys[i].key, CONSOLE_KEY) == 0)
216
            break;
216
            break;
217
    }
217
    }
218
    ASSERT(i < MAX_TOC_ENTRIES);
218
    ASSERT(i < MAX_TOC_ENTRIES);
219
   
219
   
220
    sgcn_buffer_begin = sram_begin + SRAM_TOC->keys[i].offset;
220
    sgcn_buffer_begin = sram_begin + SRAM_TOC->keys[i].offset;
Line 275... Line 275...
275
        if (ascii_check(ch)) {
275
        if (ascii_check(ch)) {
276
            if (ch == '\n')
276
            if (ch == '\n')
277
                sgcn_do_putchar('\r');
277
                sgcn_do_putchar('\r');
278
            sgcn_do_putchar(ch);
278
            sgcn_do_putchar(ch);
279
        } else
279
        } else
280
            sgcn_do_putchar(invalch);
280
            sgcn_do_putchar(U_SPECIAL);
281
       
281
       
282
        spinlock_unlock(&sgcn_output_lock);
282
        spinlock_unlock(&sgcn_output_lock);
283
    }
283
    }
284
}
284
}
285
 
285