diff options
author | wdenk <wdenk> | 2002-11-19 11:04:11 +0000 |
---|---|---|
committer | wdenk <wdenk> | 2002-11-19 11:04:11 +0000 |
commit | c7de829c796978e519984df2f1c8cfcf921a39a4 (patch) | |
tree | 43e42aa9a09f5265783c1622a5cea080471ef50e /board/MAI/bios_emulator/scitech/src/pm/os2/_pmos2.asm | |
parent | 2262cfeef91458b01a1bfe3812ccbbfdf8b82807 (diff) | |
download | u-boot-imx-c7de829c796978e519984df2f1c8cfcf921a39a4.zip u-boot-imx-c7de829c796978e519984df2f1c8cfcf921a39a4.tar.gz u-boot-imx-c7de829c796978e519984df2f1c8cfcf921a39a4.tar.bz2 |
* Patch by Thomas Frieden, 13 Nov 2002:
Add code for AmigaOne board
(preliminary merge to U-Boot, still WIP)
* Patch by Jon Diekema, 12 Nov 2002:
- Adding URL for IEEE OUI lookup
- Making the autoboot #defines dependent on CONFIG_AUTOBOOT_KEYED
being defined.
- In the CONFIG_EXTRA_ENV_SETTINGS #define, the root-on-initrd and
root-on-nfs macros are designed to switch how the default boot
method gets defined.
Diffstat (limited to 'board/MAI/bios_emulator/scitech/src/pm/os2/_pmos2.asm')
-rw-r--r-- | board/MAI/bios_emulator/scitech/src/pm/os2/_pmos2.asm | 180 |
1 files changed, 180 insertions, 0 deletions
diff --git a/board/MAI/bios_emulator/scitech/src/pm/os2/_pmos2.asm b/board/MAI/bios_emulator/scitech/src/pm/os2/_pmos2.asm new file mode 100644 index 0000000..761f0f4 --- /dev/null +++ b/board/MAI/bios_emulator/scitech/src/pm/os2/_pmos2.asm @@ -0,0 +1,180 @@ +;**************************************************************************** +;* +;* SciTech OS Portability Manager Library +;* +;* ======================================================================== +;* +;* The contents of this file are subject to the SciTech MGL Public +;* License Version 1.0 (the "License"); you may not use this file +;* except in compliance with the License. You may obtain a copy of +;* the License at http://www.scitechsoft.com/mgl-license.txt +;* +;* Software distributed under the License is distributed on an +;* "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or +;* implied. See the License for the specific language governing +;* rights and limitations under the License. +;* +;* The Original Code is Copyright (C) 1991-1998 SciTech Software, Inc. +;* +;* The Initial Developer of the Original Code is SciTech Software, Inc. +;* All Rights Reserved. +;* +;* ======================================================================== +;* +;* Language: 80386 Assembler, TASM 4.0 or NASM +;* Environment: OS/2 32 bit protected mode +;* +;* Description: Low level assembly support for the PM library specific +;* to OS/2 +;* +;**************************************************************************** + + IDEAL + +include "scitech.mac" ; Memory model macros + +header _pmos2 ; Set up memory model + +begdataseg _pmos2 + + cglobal _PM_ioentry + cglobal _PM_gdt +_PM_ioentry dd 0 ; Offset to call gate +_PM_gdt dw 0 ; Selector to call gate + +enddataseg _pmos2 + +begcodeseg _pmos2 ; Start of code segment + +;---------------------------------------------------------------------------- +; int PM_setIOPL(int iopl) +;---------------------------------------------------------------------------- +; Change the IOPL level for the 32-bit task. Returns the previous level +; so it can be restored for the task correctly. +;---------------------------------------------------------------------------- +cprocstart PM_setIOPL + + ARG iopl:UINT + + enter_c + pushfd ; Save the old EFLAGS for later + mov ecx,[iopl] ; ECX := IOPL level + xor ebx,ebx ; Change IOPL level function code (0) +ifdef USE_NASM + call far dword [_PM_ioentry] +else + call [FWORD _PM_ioentry] +endif + pop eax + and eax,0011000000000000b + shr eax,12 + leave_c + ret + +cprocend + +;---------------------------------------------------------------------------- +; void _PM_setGDTSelLimit(ushort selector, ulong limit); +;---------------------------------------------------------------------------- +; Change the GDT selector limit to given value. Used to change selector +; limits to address the entire system address space. +;---------------------------------------------------------------------------- +cprocstart _PM_setGDTSelLimit + + ARG selector:USHORT, limit:UINT + + enter_c + sub esp,20 ; Make room for selector data on stack + mov ecx,esp ; ECX := selector data structure + mov bx,[selector] ; Fill out the data structure + and bx,0FFF8h ; Kick out the LDT/GDT and DPL bits + mov [WORD ecx],bx + mov ebx,[limit] + mov [DWORD ecx+4],ebx + mov ebx,5 ; Set GDT selector limit function code +ifdef USE_NASM + call far dword [_PM_ioentry] +else + call [FWORD _PM_ioentry] +endif + add esp,20 + leave_c + ret + +cprocend + +;---------------------------------------------------------------------------- +; uchar _MTRR_getCx86(uchar reg); +;---------------------------------------------------------------------------- +; Read a Cyrix CPU indexed register +;---------------------------------------------------------------------------- +cprocstart _MTRR_getCx86 + + ARG reg:UCHAR + + enter_c + mov al,[reg] + out 22h,al + in al,23h + leave_c + ret + +cprocend + +;---------------------------------------------------------------------------- +; uchar _MTRR_setCx86(uchar reg,uchar val); +;---------------------------------------------------------------------------- +; Write a Cyrix CPU indexed register +;---------------------------------------------------------------------------- +cprocstart _MTRR_setCx86 + + ARG reg:UCHAR, val:UCHAR + + enter_c + mov al,[reg] + out 22h,al + mov al,[val] + out 23h,al + leave_c + ret + +cprocend + +;---------------------------------------------------------------------------- +; ulong _MTRR_disableInt(void); +;---------------------------------------------------------------------------- +; Return processor interrupt status and disable interrupts. +;---------------------------------------------------------------------------- +cprocstart _MTRR_disableInt + +; Do nothing! + ret + +cprocend + +;---------------------------------------------------------------------------- +; void _MTRR_restoreInt(ulong ps); +;---------------------------------------------------------------------------- +; Restore processor interrupt status. +;---------------------------------------------------------------------------- +cprocstart _MTRR_restoreInt + +; Do nothing! + ret + +cprocend + +;---------------------------------------------------------------------------- +; void DebugInt(void) +;---------------------------------------------------------------------------- +cprocstart DebugInt + + int 3 + ret + +cprocend + +endcodeseg _pmos2 + + END ; End of module + |