Opened 5 years ago

Closed 3 years ago

Last modified 15 months ago

#470 closed enhancement (No Change Needed)

Suggest to import flat DS selector instead of computing it

Reported by: erdmann Owned by: eco
Priority: trivial Milestone:
Component: ACPI PSD Version: 3.17
Keywords: Cc:

Description

I just tried my suggestion to import the values from FlatCS and FlatDS from DOSCALLS and it works.
Looking at the code: you erroneously took the ADDRESS of the symbol (extrn DOSFLATDS: WORD)
but the value is an ABSOLUTE value (extrn DOS32FLATDS:ABS).

Therefore:
\src\acpi\psd\makefile:
...
LIBRARY ACPI
;PROTMODE
;DATA PRELOAD SINGLE SHARED MOVABLE
;CODE PRELOAD MOVABLE
IMPORTS

DOS32FLATCS=DOSCALLS.369
DOS32FLATDS=DOSCALLS.370

EXPORTS

PSD_APP_COMM = _PSD_APP_COMM
PSD_INSTALL = _PSD_INSTALL
PSD_DEINSTALL = _PSD_DEINSTALL
PSD_INIT = _PSD_INIT
PSD_GET_NUM_OF_PROCS = _PSD_GET_NUM_OF_PROCS
PSD_PROC_INIT = _PSD_PROC_INIT
PSD_START_PROC = _PSD_START_PROC
PSD_GEN_IPI = _PSD_GEN_IPI
PSD_END_IPI = _PSD_END_IPI
PSD_IRQ_MASK = _PSD_IRQ_MASK
PSD_IRQ_REG = _PSD_IRQ_REG
PSD_IRQ_EOI = _PSD_IRQ_EOI
PSD_SET_ADV_INT_MODE = _PSD_SET_ADV_INT_MODE
PSD_RESET_MODE = _PSD_RESET_MODE
PSD_SET_PROC_STATE = _PSD_SET_PROC_STATE
PSD_PROC_HLT = _PSD_PROC_HLT


<<keep

src\acpi\psd\oshdl.asm:

...
extrn PASCAL DOS32FLATDS:ABS
extrn PASCAL DOS32FLATCS:ABS

in "IntVector?", around line 369:

...
SwitchStackBack? ; Switch stack back
push ds
ASSUME DS: FLAT ;
mov bx,DOS32FLATDS
mov ds,bx
...


in "SwitchStackToMyPSD", around line 38:

...
push ds ; Save DS
ASSUME DS: FLAT ;
mov ax,DOS32FLATDS
mov ds,ax
...

Change History (4)

comment:1 Changed 5 years ago by pasha

Let first check, then ask? DOS32FLATDS and DOS32FLATCS has wrong value for any loaded psd.

comment:2 Changed 5 years ago by erdmann

I am not sure I understand. I did check my suggestion: I changed makefile/code and rebuilt ACPI.PSD. I can say that I don't experience any unexpected effect.
Are you saying I have forgotten something ?

comment:3 Changed 3 years ago by erdmann

  • Resolution set to invalid
  • Status changed from new to closed

comment:4 Changed 15 months ago by dazarewicz

  • Milestone eCS 2.x deleted

Milestone eCS 2.x deleted

Note: See TracTickets for help on using tickets.