Subversion Repositories HelenOS

Rev

Rev 2131 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2131 Rev 2292
Line 71... Line 71...
71
 
71
 
72
static bool rd_init(void)
72
static bool rd_init(void)
73
{
73
{
74
    size_t rd_size = sysinfo_value("rd.size");
74
    size_t rd_size = sysinfo_value("rd.size");
75
    void * rd_ph_addr = (void *) sysinfo_value("rd.address.physical");
75
    void * rd_ph_addr = (void *) sysinfo_value("rd.address.physical");
76
    int rd_color = (int) sysinfo_value("rd.address.color");
-
 
77
   
76
   
78
    if (rd_size == 0)
77
    if (rd_size == 0)
79
        return false;
78
        return false;
80
   
79
   
81
    void * rd_addr = as_get_mappable_page(rd_size, rd_color);
80
    void * rd_addr = as_get_mappable_page(rd_size);
82
   
81
   
83
    physmem_map(rd_ph_addr, rd_addr, ALIGN_UP(rd_size, PAGE_SIZE) >> PAGE_WIDTH, AS_AREA_READ | AS_AREA_WRITE);
82
    physmem_map(rd_ph_addr, rd_addr, ALIGN_UP(rd_size, PAGE_SIZE) >> PAGE_WIDTH, AS_AREA_READ | AS_AREA_WRITE);
84
   
83
   
85
    return true;
84
    return true;
86
}
85
}