VirtualBox

Changeset 42770 in vbox for trunk/src


Ignore:
Timestamp:
Aug 11, 2012 5:03:21 PM (12 years ago)
Author:
vboxsync
Message:

BIOS: Added a very minimal APM implementation.

Location:
trunk/src/VBox/Devices/PC/BIOS
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/PC/BIOS/Makefile.kmk

    r42369 r42770  
    5858        scsi.c \
    5959        ahci.c \
     60        apm.c \
    6061        pcibios.c \
    6162        pciutil.c \
     
    6364        ../../BiosCommonCode/support.asm \
    6465        pcibio32.asm \
     66        apm_pm.asm \
    6567        $(VBoxPcBios32_1_TARGET) \
    6668        orgs.asm
  • trunk/src/VBox/Devices/PC/BIOS/makefile

    r42332 r42770  
    3131
    3232OBJS =  bios.obj print.obj ata.obj floppy.obj eltorito.obj boot.obj &
    33         keyboard.obj disk.obj serial.obj system.obj timepci.obj &
    34         ps2mouse.obj parallel.obj logo.obj scsi.obj ahci.obj &
     33        keyboard.obj disk.obj serial.obj system.obj timepci.obj logo.obj &
     34        ps2mouse.obj parallel.obj scsi.obj ahci.obj apm.obj apm_pm.obj &
    3535        pcibios.obj pciutil.obj vds.obj pcibio32.obj pci32.obj orgs.obj
    3636
  • trunk/src/VBox/Devices/PC/BIOS/notes.txt

    r41547 r42770  
    4646- PC DOS 6.x/7.x QCONFIG is a rare user of INT 16h fn 0Ah (read keyboard ID).
    4747
     48- Windows 98 is one of the few APM 1.2 users; Windows 95 uses APM 1.1, while
     49  newer systems prefer ACPI.
     50
    4851
    4952 Notes on BIOS implementation
     
    7275  the type unsigned.
    7376
     77- The PCI BIOS services are implemented in C, compiled twice as 16-bit and
     78  32-bit code. This reduces the development effort and significantly lowers
     79  the risk of discrepancies between 16-bit and 32-bit implementation. Care
     80  must be taken because the 16-bit implementation can be executed in both
     81  real and protected mode.
     82
     83- APM can be in theory implemented only once for real, 16-bit protected and
     84  32-bit protected mode. Unfortunately this is very inconvenient in C since
     85  the default stack size changes between 16-bit and 32-bit callers. Therefore
     86  real mode APM (which supports most functions) is implemented in C and
     87  protected-mode APM is written in assembler for both 16-bit and 32-bit calls,
     88  with a small 32->16 thunk.
    7489
    7590
  • trunk/src/VBox/Devices/PC/BIOS/orgs.asm

    r42392 r42770  
    112112extrn           _int70_function:near
    113113extrn           _int74_function:near
     114extrn           _apm_function:near
    114115extrn           _ata_init:near
    115116extrn           _ahci_init:near
     
    15191520int15_handler:
    15201521                pushf
    1521                 cmp     ah, 53h         ; APM function?
    1522                 je      apm_call
    15231522                push    ds
    15241523                push    es
     
    15291528                je      int15_handler32
    15301529                pusha
    1531                 cmp     ah, 0C2h
     1530                cmp     ah, 53h         ; APM function?
     1531                je      apm_call
     1532                cmp     ah, 0C2h        ; PS/2 mouse function?
    15321533                je      int15_handler_mouse
    15331534
    15341535                call    _int15_function
    1535 int15_handler_mouse_ret:
     1536int15_handler_popa_ret:
    15361537                popa
    15371538int15_handler32_ret:
     
    15421543
    15431544apm_call:
    1544 ; TODO!!
    1545                 popf
    1546                 stc
    1547                 jmp     iret_modify_cf
    1548 ;               jmp     apmreal_entry
     1545                call    _apm_function
     1546                jmp     int15_handler_popa_ret
    15491547
    15501548int15_handler_mouse:
    15511549                call    _int15_function_mouse
    1552                 jmp     int15_handler_mouse_ret
     1550                jmp     int15_handler_popa_ret
    15531551
    15541552int15_handler32:
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette