Rev 89 | Rev 134 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 89 | Rev 103 | ||
---|---|---|---|
Line 138... | Line 138... | ||
138 | mov dx, row*256 + column |
138 | mov dx, row*256 + column |
139 | call setcursor |
139 | call setcursor |
140 | } |
140 | } |
Line 141... | Line 141... | ||
141 | 141 | ||
- | 142 | pagetable_set: |
|
- | 143 | ;eax - physical address |
|
- | 144 | ;es:di - page table |
|
142 | pagetable_set: |
145 | ;ecx - number of pages to map |
143 | or al, 7 |
146 | or al, 7 |
144 | @@: |
147 | @@: |
145 | stosd |
148 | stosd |
146 | add eax, 1000h |
149 | add eax, 1000h |
Line 1045... | Line 1048... | ||
1045 | 1048 | ||
1046 | push 0x6000 |
1049 | push 0x6000 |
1047 | pop es ; es:di = 6000:0 |
1050 | pop es ; es:di = 6000:0 |
1048 | xor di,di |
1051 | xor di,di |
1049 | mov cx,256*map_mem ; Map (mapmem) M |
- | |
1050 | ; mov eax,7 |
- | |
1051 | ; pt2: |
- | |
1052 | ; cmp cx,256*(map_mem-8) ; 8 M map to LFB |
- | |
1053 | ; jnz pt3 |
- | |
1054 | ; pop eax |
- | |
1055 | ; add eax,7 |
- | |
1056 | ; pt3: |
- | |
1057 | ; cmp cx,256*(map_mem-12) ; 12 M back to linear = physical |
- | |
1058 | ; jnz pt4 |
- | |
1059 | ; mov eax,12*0x100000 + 7 |
- | |
1060 | ; pt4: |
- | |
1061 | ; stosd |
- | |
1062 | ; add eax,4096 |
- | |
1063 | ; loop pt2 |
1052 | mov cx,256*map_mem ; Map (mapmem) M |
1064 | ; initialize as identity mapping |
1053 | ; initialize as identity mapping |
1065 | xor eax, eax |
1054 | xor eax, eax |
1066 | call pagetable_set |
- | |
1067 | ; 8M..12M map to LFB |
- | |
1068 | pop eax |
- | |
1069 | ; mov cx, 256*4 |
- | |
1070 | mov ch, 4 |
- | |
1071 | mov di, 2000h |
- | |
Line 1072... | Line -... | ||
1072 | call pagetable_set |
- | |
1073 | - | ||
1074 | push 0x7100 |
- | |
1075 | pop es |
- | |
1076 | xor di,di |
- | |
1077 | mov eax,8*0x100000 |
- | |
Line 1078... | Line 1055... | ||
1078 | mov cx,256*4 |
1055 | call pagetable_set |
Line 1079... | Line 1056... | ||
1079 | call pagetable_set |
1056 | |
1080 | 1057 | ||
1081 | ; 4 KB PAGE DIRECTORY |
1058 | ; 4 KB PAGE DIRECTORY |
1082 | 1059 | ||
1083 | push 0x7F00 |
1060 | push 0x7F00 |
1084 | pop es ; es:di = 7F00:0 |
1061 | pop es ; es:di = 7F00:0 |
1085 | xor di, di |
- | |
1086 | mov cx, 64 / 4 |
1062 | xor di, di |
1087 | mov eax, 0x60007 ; for 0 M |
1063 | mov cx, 64 / 4 |
1088 | call pagetable_set |
1064 | mov eax, 0x60007 ; for 0 M |
1089 | mov dword [es:0x800],0x71007 ;map region 0x80000000-0x803FFFFF to 0x800000-0xCFFFFF |
1065 | call pagetable_set |