Subversion Repositories HelenOS

Rev

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

Rev 3906 Rev 3908
Line 159... Line 159...
159
 
159
 
160
/** SGCN character device */
160
/** SGCN character device */
161
chardev_t sgcn_io;
161
chardev_t sgcn_io;
162
 
162
 
163
/**
163
/**
164
 * Registers the physical area of the SRAM so that the userspace SGCN
164
 * Set some sysinfo values (SRAM address and SRAM size).
165
 * driver can map it. Moreover, it sets some sysinfo values (SRAM address
-
 
166
 * and SRAM size).
-
 
167
 */
165
 */
168
static void register_sram_parea(uintptr_t sram_begin_physical)
166
static void register_sram(uintptr_t sram_begin_physical)
169
{
167
{
170
    static parea_t sram_parea;
-
 
171
    sram_parea.pbase = sram_begin_physical;
-
 
172
    sram_parea.vbase = (uintptr_t) sram_begin;
-
 
173
    sram_parea.frames = MAPPED_AREA_SIZE / FRAME_SIZE;
-
 
174
    sram_parea.cacheable = false;
-
 
175
    ddi_parea_register(&sram_parea);
-
 
176
   
-
 
177
    sysinfo_set_item_val("sram.area.size", NULL, MAPPED_AREA_SIZE);
168
    sysinfo_set_item_val("sram.area.size", NULL, MAPPED_AREA_SIZE);
178
    sysinfo_set_item_val("sram.address.physical", NULL,
169
    sysinfo_set_item_val("sram.address.physical", NULL,
179
        sram_begin_physical);
170
        sram_begin_physical);
180
}
171
}
181
 
172
 
Line 209... Line 200...
209
 
200
 
210
    sram_begin_physical = SBBC_START + SBBC_SRAM_OFFSET
201
    sram_begin_physical = SBBC_START + SBBC_SRAM_OFFSET
211
        + *((uint32_t *) iosram_toc->value);
202
        + *((uint32_t *) iosram_toc->value);
212
    sram_begin = hw_map(sram_begin_physical, MAPPED_AREA_SIZE);
203
    sram_begin = hw_map(sram_begin_physical, MAPPED_AREA_SIZE);
213
   
204
   
214
    register_sram_parea(sram_begin_physical);
205
    register_sram(sram_begin_physical);
215
}
206
}
216
 
207
 
217
/**
208
/**
218
 * Initializes the starting address of the SGCN buffer.
209
 * Initializes the starting address of the SGCN buffer.
219
 *
210
 *