Revision 128
controller implemented
graphics.c | ||
---|---|---|
59 | 59 |
|
60 | 60 |
VbeInfoBlock *virtual_addr = lm_alloc(sizeof(VbeInfoBlock), &controller_map); |
61 | 61 |
|
62 |
uint32_t virtual_base = (uint32_t)(virtual_addr) - controller_map.phys; |
|
63 |
|
|
62 | 64 |
virtual_addr->VbeSignature[0] = 'V'; |
63 | 65 |
virtual_addr->VbeSignature[1] = 'B'; |
64 | 66 |
virtual_addr->VbeSignature[2] = 'E'; |
... | ... | |
95 | 97 |
|
96 | 98 |
// Convert Far Far Pointer to Virtual Address |
97 | 99 |
|
98 |
//uint32_t phys_ptr = FAR2PHYS(virtual_addr->OemStringPtr); |
|
100 |
uint32_t phys_ptr = FAR2PHYS(virtual_addr->OemStringPtr); |
|
101 |
uint32_t virtual_ptr = phys_ptr + virtual_base; |
|
102 |
info_p->OEMString = (char*)(virtual_ptr); |
|
99 | 103 |
|
104 |
phys_ptr = FAR2PHYS(virtual_addr->VideoModePtr); |
|
105 |
virtual_ptr = phys_ptr + virtual_base; |
|
106 |
info_p->VideoModeList = (uint16_t*)(virtual_ptr); |
|
100 | 107 |
|
108 |
phys_ptr = FAR2PHYS(virtual_addr->OemVendorNamePtr); |
|
109 |
virtual_ptr = phys_ptr + virtual_base; |
|
110 |
info_p->OEMVendorNamePtr = (char*)(virtual_ptr); |
|
101 | 111 |
|
112 |
phys_ptr = FAR2PHYS(virtual_addr->OemProductNamePtr); |
|
113 |
virtual_ptr = phys_ptr + virtual_base; |
|
114 |
info_p->OEMProductNamePtr = (char*)(virtual_ptr); |
|
102 | 115 |
|
116 |
phys_ptr = FAR2PHYS(virtual_addr->OemProductRevPtr); |
|
117 |
virtual_ptr = phys_ptr + virtual_base; |
|
118 |
info_p->OEMProductRevPtr = (char*)(virtual_ptr); |
|
103 | 119 |
|
120 |
lm_free(&controller_map); |
|
104 | 121 |
|
105 | 122 |
|
123 |
|
|
124 |
|
|
106 | 125 |
return SUCCESS; |
107 | 126 |
} |
108 | 127 |
|
Also available in: Unified diff