Changeset 50160 in vbox
- Timestamp:
- Jan 22, 2014 3:39:46 PM (11 years ago)
- svn:sync-xref-src-repo-rev:
- 91723
- Location:
- trunk/src/VBox/Devices/PC/BIOS
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/PC/BIOS/Makefile.kmk
r49286 r50160 42 42 segment BIOSSEG segaddr=0xF000 offset=0xE000 43 43 VBoxPcBios_SOURCES = \ 44 post.c \ 44 45 bios.c \ 45 46 print.c \ -
trunk/src/VBox/Devices/PC/BIOS/biosint.h
r48123 r50160 66 66 #define DEBUG_PCI 0 67 67 #define DEBUG_APM 0 68 #define DEBUG_POST 0 68 69 69 70 #define FP_OFF(p) ((unsigned)(p)) -
trunk/src/VBox/Devices/PC/BIOS/makefile
r49286 r50160 30 30 wasm -fo=.obj $(AFLAGS) $(DEFS) $< 31 31 32 OBJS = bios.obj p rint.obj ata.obj floppy.obj floppyt.obj eltorito.obj &32 OBJS = bios.obj post.obj ata.obj floppy.obj floppyt.obj eltorito.obj & 33 33 boot.obj keyboard.obj disk.obj serial.obj system.obj invop.obj & 34 34 timepci.obj logo.obj ps2mouse.obj parallel.obj scsi.obj & 35 35 ahci.obj apm.obj apm_pm.obj pcibios.obj pciutil.obj vds.obj & 36 p cibio32.obj pci32.obj orgs.obj36 print.obj pcibio32.obj pci32.obj orgs.obj 37 37 38 38 vbxbios.rom : vbxbios.bin -
trunk/src/VBox/Devices/PC/BIOS/orgs.asm
r49286 r50160 128 128 extrn _print_bios_banner:near 129 129 extrn _inv_op_handler:near 130 extrn rom_scan_:near 130 131 131 132 … … 169 170 public int15_handler_mouse 170 171 public iret_modify_cf 171 public rom_scan172 public rom_checksum173 172 public init_pic 174 173 public floppy_post … … 393 392 call ebda_post 394 393 394 ;; Initialize PCI devices. This can and should be done early. 395 call pcibios_init_iomem_bases 396 call pcibios_init_irqs 397 395 398 ;; PIT setup 396 399 SET_INT_VECTOR 08h, BIOSSEG, int08_handler … … 400 403 out 40h, al 401 404 out 40h, al 405 406 ;; video setup - must be done before POSTing VGA ROM 407 SET_INT_VECTOR 10h, BIOSSEG, int10_handler 402 408 403 409 ;; keyboard setup … … 425 431 push ds 426 432 C_SETUP 433 434 ;; Scan for video ROMs in the C000-C800 range. This is done 435 ;; early so that errors are displayed on the screen. 436 mov ax, 0C000h 437 mov dx, 0C800h 438 call rom_scan_ 439 440 ;; Initialize the keyboard 427 441 call _keyboard_init 428 442 pop ds … … 484 498 SET_INT_VECTOR 75h, BIOSSEG, int75_handler 485 499 486 ;; Video setup487 SET_INT_VECTOR 10h, BIOSSEG, int10_handler488 489 500 call init_pic 490 491 call pcibios_init_iomem_bases492 call pcibios_init_irqs493 494 call rom_scan495 501 496 502 jmp norm_post_cont … … 562 568 C_SETUP ; in case assembly code changed things 563 569 call _print_bios_banner 570 571 ;; Scan for additional ROMs in the C800-EFFF range 572 mov ax, 0C800h 573 mov dx, 0F000h 574 call rom_scan_ 564 575 565 576 ;; El Torito floppy/hard disk emulation … … 732 743 733 744 734 rom_checksum proc near735 push ax736 ifdef CHECKSUM_ROMS737 push bx738 push cx739 xor ax, ax740 xor bx, bx741 xor cx, cx742 mov ch, ds:[2]743 shl cx, 1744 checksum_loop:745 add al, [bx]746 inc bx747 loop checksum_loop748 and al, 0FFh ; set flags749 pop cx750 pop bx751 else752 xor al, al753 endif754 pop ax755 ret756 rom_checksum endp757 758 759 ;;760 ;; ROM scan - scan for valid ROMs and initialize them761 ;;762 rom_scan:763 mov cx, 0C000h ; start at C000764 rom_scan_loop:765 mov ds, cx766 mov ax, 4 ; scan in 2K increments767 cmp word ptr ds:[0], 0AA55h ; look for signature768 jne rom_scan_increment769 770 call rom_checksum771 jnz rom_scan_increment772 773 mov al, ds:[2] ; set increment to ROM length774 test al, 3775 jz block_count_rounded776 777 and al, 0FCh ; round up778 add al, 4 ; to nearest 2K779 block_count_rounded:780 xor bx, bx781 mov ds, bx782 push ax783 push cx ; push segment...784 push 3 ; ...and offset of ROM entry785 mov bp, sp786 call dword ptr [bp] ; call ROM init routine787 cli ; in case ROM enabled interrupts788 add sp, 2 ; get rid of offset789 pop cx ; restore registers790 pop ax791 rom_scan_increment:792 shl ax, 5 ; convert to 16-byte increments793 add cx, ax794 cmp cx, 0E800h ; must encompass VBOX_LANBOOT_SEG!795 jbe rom_scan_loop796 797 xor ax, ax ; DS back to zero798 mov ds, ax799 ret800 801 745 init_pic proc near 802 746
Note:
See TracChangeset
for help on using the changeset viewer.