OpenCores
URL https://opencores.org/ocsvn/or1k_old/or1k_old/trunk

Subversion Repositories or1k_old

[/] [or1k_old/] [trunk/] [rc203soc/] [sw/] [uClinux/] [include/] [asm-armnommu/] [arch-trio/] [uncompress.h] - Blame information for rev 1782

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1633 jcastillo
/*
2
 * linux/include/asm-arm/arch-a5k/uncompress.h
3
 *
4
 * Copyright (C) 1996 Russell King
5
 */
6
#define VIDMEM ((char *)0x02000000)
7
 
8
#include "../arch/arm/drivers/char/font.h"
9
 
10
int video_num_columns, video_num_lines, video_size_row;
11
int white, bytes_per_char_h;
12
extern unsigned long con_charconvtable[256];
13
 
14
struct param_struct {
15
        unsigned long page_size;
16
        unsigned long nr_pages;
17
        unsigned long ramdisk_size;
18
        unsigned long mountrootrdonly;
19
        unsigned long rootdev;
20
        unsigned long video_num_cols;
21
        unsigned long video_num_rows;
22
        unsigned long video_x;
23
        unsigned long video_y;
24
        unsigned long memc_control_reg;
25
        unsigned char sounddefault;
26
        unsigned char adfsdrives;
27
        unsigned char bytes_per_char_h;
28
        unsigned char bytes_per_char_v;
29
        unsigned long unused[256/4-11];
30
};
31
 
32
static struct param_struct *params = (struct param_struct *)0x0;
33
 
34
/*
35
 * This does not append a newline
36
 */
37
static void puts(const char *s)
38
{
39
#if 0
40
        extern void ll_write_char(char *, unsigned long);
41
        int x,y;
42
        unsigned char c;
43
        char *ptr;
44
 
45
        x = params->video_x;
46
        y = params->video_y;
47
 
48
        while ( ( c = *(unsigned char *)s++ ) != '\0' ) {
49
                if ( c == '\n' ) {
50
                        x = 0;
51
                        if ( ++y >= video_num_lines ) {
52
                                y--;
53
                        }
54
                } else {
55
                        ptr = VIDMEM + ((y*video_num_columns*params->bytes_per_char_v+x)*bytes_per_char_h);
56
                        ll_write_char(ptr, c|(white<<8));
57
                        if ( ++x >= video_num_columns ) {
58
                                x = 0;
59
                                if ( ++y >= video_num_lines ) {
60
                                        y--;
61
                                }
62
                        }
63
                }
64
        }
65
 
66
        params->video_x = x;
67
        params->video_y = y;
68
#endif
69
}
70
 
71
static void error(char *x);
72
 
73
/*
74
 * Setup for decompression
75
 */
76
static void arch_decomp_setup(void)
77
{
78
        int i;
79
 
80
        video_num_lines = params->video_num_rows;
81
        video_num_columns = params->video_num_cols;
82
        bytes_per_char_h = params->bytes_per_char_h;
83
        video_size_row = video_num_columns * bytes_per_char_h;
84
        if (bytes_per_char_h == 4)
85
                for (i = 0; i < 256; i++)
86
                        con_charconvtable[i] =
87
                                (i & 128 ? 1 << 0  : 0) |
88
                                (i & 64  ? 1 << 4  : 0) |
89
                                (i & 32  ? 1 << 8  : 0) |
90
                                (i & 16  ? 1 << 12 : 0) |
91
                                (i & 8   ? 1 << 16 : 0) |
92
                                (i & 4   ? 1 << 20 : 0) |
93
                                (i & 2   ? 1 << 24 : 0) |
94
                                (i & 1   ? 1 << 28 : 0);
95
        else
96
                for (i = 0; i < 16; i++)
97
                        con_charconvtable[i] =
98
                                (i & 8   ? 1 << 0  : 0) |
99
                                (i & 4   ? 1 << 8  : 0) |
100
                                (i & 2   ? 1 << 16 : 0) |
101
                                (i & 1   ? 1 << 24 : 0);
102
 
103
        white = bytes_per_char_h == 8 ? 0xfc : 7;
104
 
105
        if (params->nr_pages * params->page_size < 4096*1024) error("<4M of mem\n");
106
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.