- Timestamp:
- Apr 11, 2014 9:38:17 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/PC/BIOS/orgs.asm
r51000 r51059 198 198 199 199 ;; 200 ;; Start of fixed code - eoi_jmp_post is kept here to allow short jumps.200 ;; Start of fixed code - eoi_jmp_post is kept near here to allow short jumps. 201 201 ;; 202 202 BIOSORG 0E030h 203 eoi_jmp_post:204 call eoi_both_pics205 xor ax, ax206 mov ds, ax207 jmp dword ptr ds:[0467h]208 209 eoi_both_pics:210 203 mov al, PIC_CMD_EOI 211 204 out PIC_SLAVE, al … … 228 221 set_int_vects endp 229 222 223 eoi_jmp_post: 224 call eoi_both_pics 225 xor ax, ax 226 mov ds, ax 227 jmp dword ptr ds:[0467h] 228 229 eoi_both_pics: 230 230 ;; -------------------------------------------------------- 231 231 ;; POST entry point … … 243 243 ;; Reset processor to get out of protected mode. Use system 244 244 ;; port instead of KBC. 245 ;; NB: We only need bit 0 to be set in AL, which we just 246 ;; determined to be the case.245 reset_sys: 246 mov al, 1 247 247 out 92h, al 248 248 jmp $ ; not strictly necessary in a VM … … 250 250 251 251 in_real_mode: 252 ;; TODO: Check KBC system flag first253 254 252 ;; read the CMOS shutdown status 255 253 mov al, 0Fh … … 260 258 xchg ah, al 261 259 260 ;; Check KBC self-test/shutdown flag. If it is set, we need 261 ;; to check for a reboot attempt. 262 in al, 64h 263 test al, 4 ; clear flag indicates cold boot 264 jz cont_post 265 266 ;; Warm boot, check the shutdown byte. 267 mov al, ah 268 or al, al 269 jnz cont_post 270 271 ;; Warm boot but shutdown byte is zero. This is either a warm 272 ;; boot request or an attempt to reset the system via triple 273 ;; faulting the CPU or similar. Check reboot flag. 274 ;; NB: At this point, registers need not be preserved. 275 push 40h 276 pop ds 277 cmp word ptr ds:[72h], 1234h 278 jnz reset_sys ; trigger system reset 279 280 cont_post: 262 281 ;; reset the shutdown status in CMOS 263 282 mov al, 0Fh … … 491 510 call rtc_post 492 511 493 ;; PS/2 mouse setup494 SET_INT_VECTOR 74h, BIOSSEG, int74_handler495 496 ;; IRQ 13h (FPU exception) setup497 SET_INT_VECTOR 75h, BIOSSEG, int75_handler498 499 call init_pic500 501 512 jmp norm_post_cont 502 513 … … 544 555 545 556 norm_post_cont: 557 ;; PS/2 mouse setup 558 SET_INT_VECTOR 74h, BIOSSEG, int74_handler 559 560 ;; IRQ 13h (FPU exception) setup 561 SET_INT_VECTOR 75h, BIOSSEG, int75_handler 562 563 call init_pic 564 546 565 C_SETUP 547 566 ;; ATA/ATAPI driver setup
Note:
See TracChangeset
for help on using the changeset viewer.