Project

General

Profile

Revision 121

removed get_permissions_first_mbyte since it is no longer needed

View differences:

lab5/graphics.c
17 17
    return sys_privctl(SELF, SYS_PRIV_ADD_MEM, &mmr);
18 18
}
19 19

  
20
int (get_permissions_first_mbyte)(void) {
21
    return get_permission(MBYTE_BASE, MBYTE_SIZE);
22
}
20
//int (get_permissions_first_mbyte)(void) {
21
//    return get_permission(MBYTE_BASE, MBYTE_SIZE);
22
//}
23 23

  
24 24
int (vbe_get_mode_information)(uint16_t mode) {
25 25
    memset(&vbe_mem_info, 0, sizeof(vbe_mode_info_t)); // reset values
lab5/graphics.h
14 14

  
15 15
int (get_permission)(unsigned int base_addr, unsigned int size);
16 16

  
17
int (get_permissions_first_mbyte)(void);
17
//int (get_permissions_first_mbyte)(void);
18 18

  
19 19
int (vbe_get_mode_information)(uint16_t mode);
20 20

  
lab5/lab5.c
38 38
}
39 39

  
40 40
int(video_test_init)(uint16_t mode, uint8_t delay) {
41
    int r;
42
    if ((r = get_permissions_first_mbyte()))
43
        panic("%s: sys_privctl (ADD MEM) failed: %d\n", __func__, r);
41
    //int r;
42
    //if ((r = get_permissions_first_mbyte()))
43
    //    panic("%s: sys_privctl (ADD MEM) failed: %d\n", __func__, r);
44 44

  
45 45
    if (vbe_get_mode_information(mode)) {
46 46
        printf("%s: failed to get information for mode %x.\n", __func__, mode);
......
79 79
// lcom_run lab5 "rectangle 115 100 100 100 100 FF0000"
80 80
int(video_test_rectangle)(uint16_t mode, uint16_t x, uint16_t y, uint16_t width, uint16_t height, uint32_t color) {
81 81
    int r;
82
    if ((r = get_permissions_first_mbyte()))
83
        panic("%s: sys_privctl (ADD MEM) failed: %d\n", __func__, r);
82
    //if ((r = get_permissions_first_mbyte()))
83
    //    panic("%s: sys_privctl (ADD MEM) failed: %d\n", __func__, r);
84 84

  
85 85
    if (vbe_get_mode_information(mode)) {
86 86
        printf("%s: failed to get information for mode %x.\n", __func__, mode);
......
167 167

  
168 168
int(video_test_pattern)(uint16_t mode, uint8_t no_rectangles, uint32_t first, uint8_t step) {
169 169
    int r;
170
    if ((r = get_permissions_first_mbyte()))
171
        panic("%s: sys_privctl (ADD MEM) failed: %d\n", __func__, r);
170
    //if ((r = get_permissions_first_mbyte()))
171
    //    panic("%s: sys_privctl (ADD MEM) failed: %d\n", __func__, r);
172 172

  
173 173
    if (vbe_get_mode_information(mode)) {
174 174
        printf("%s: failed to get information for mode %x.\n", __func__, mode);

Also available in: Unified diff