Changeset 116 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Boot/BootVars.asm


Ignore:
Timestamp:
Feb 26, 2011, 11:55:06 PM (13 years ago)
Author:
krille_n_@…
google:author:
krille_n_@hotmail.com
Message:

Changes to all parts of the project:

  • Removed a redundant macro (HPIO_NORMALIZE_PTR)
  • Deleted XTIDE_Universal_BIOS/Inc/BiosData.inc since that was also redundant.
  • Size optimization: Changed the LOAD_BDA_SEGMENT_TO macro to use the stack on 186+ processors (the old behaviour can still be used where needed).
  • Made other minor size optimizations and cleanups to various functions, mostly in the Int13h handler.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/XTIDE_Universal_BIOS/Src/Boot/BootVars.asm

    r96 r116  
    2828; POST stack is not large enough when DPTs are stored to 30:0h.
    2929;
     30; Note regarding LOAD_BDA_SEGMENT_TO: If you force the use of SP
     31; then you also have to unconditionally enable the CLI/STI pair.
     32; The reason for this is that only some buggy 808x CPU:s need the
     33; CLI/STI instruction pair when changing stacks. Other CPU:s disable
     34; interrupts automatically when SS is modified for the duration of
     35; the immediately following instruction to give time to change SP.
     36;
    3037; BootVars_SwitchToBootMenuStack
    3138;   Parameters:
     
    3946BootVars_SwitchToBootMenuStack:
    4047    pop     ax                          ; Pop return address
     48%ifndef USE_186
    4149    cli                                 ; Disable interrupts
     50%endif
    4251    LOAD_BDA_SEGMENT_TO ss, sp
    4352    mov     sp, BOOTVARS.rgbMnuStack    ; Load offset to stack
     53%ifndef USE_186
    4454    sti                                 ; Enable interrupts
     55%endif
    4556    jmp     ax
    4657
     
    4859;--------------------------------------------------------------------
    4960; Restores SS and SP to initial boot loader values.
     61;
     62; Before doing any changes, see the note regarding
     63; LOAD_BDA_SEGMENT_TO in BootVars_SwitchToBootMenuStack
    5064;
    5165; BootVars_SwitchBackToPostStack
     
    6074BootVars_SwitchBackToPostStack:
    6175    pop     ax                          ; Pop return address
     76%ifndef USE_186
    6277    cli                                 ; Disable interrupts
     78%endif
    6379    LOAD_BDA_SEGMENT_TO ss, sp
    6480%ifndef USE_386
     
    6884    lss     sp, [ss:BOOTVARS.dwPostStack]
    6985%endif
     86%ifndef USE_186
    7087    sti                                 ; Enable interrupts
     88%endif
    7189    jmp     ax
Note: See TracChangeset for help on using the changeset viewer.