Update comments

This commit is contained in:
Satoshi Tanda
2020-03-07 10:47:18 -08:00
parent adf09d85af
commit cd56f77bc0
32 changed files with 276 additions and 229 deletions

View File

@@ -25,7 +25,10 @@ Index = 0
; Index is incremented whenever this macro is used.
;
INTERRUPT_HANDLER macro InterruptNumber
push 0 ; Push dummy error code for consistent stack layout.
;
; Push dummy error code for consistent stack layout.
;
push 0
push InterruptNumber
jmp AsmCommonExceptionHandler
Index = Index + 1
@@ -38,7 +41,10 @@ endm
; Index is incremented whenever this macro is used.
;
INTERRUPT_HANDLER_WITH_CODE macro InterruptNumber
nop ; Error code is expected to be pushed by the processor.
;
; Error code is expected to be pushed by the processor.
;
nop
nop
push InterruptNumber
jmp AsmCommonExceptionHandler
@@ -53,26 +59,44 @@ endm
; works as a hendler of the corresponding interrupt/exception in the host.
;
AsmDefaultExceptionHandlers proc
repeat 8
INTERRUPT_HANDLER Index ; INT0-7
endm
;
; INT0-7
;
repeat 8
INTERRUPT_HANDLER Index
endm
INTERRUPT_HANDLER_WITH_CODE Index ; INT8
INTERRUPT_HANDLER Index ; INT9
;
; INT8, INT9
;
INTERRUPT_HANDLER_WITH_CODE Index
INTERRUPT_HANDLER Index
repeat 5
INTERRUPT_HANDLER_WITH_CODE Index ; INT10-14
endm
;
; INT10-14
;
repeat 5
INTERRUPT_HANDLER_WITH_CODE Index
endm
repeat 2
INTERRUPT_HANDLER Index ; INT15-16
endm
;
; INT15-16
;
repeat 2
INTERRUPT_HANDLER Index
endm
INTERRUPT_HANDLER_WITH_CODE Index ; INT17
;
; INT17
;
INTERRUPT_HANDLER_WITH_CODE Index
repeat 238
INTERRUPT_HANDLER Index ; INT18-255
endm
;
; INT18-255
;
repeat 238
INTERRUPT_HANDLER Index
endm
AsmDefaultExceptionHandlers endp
;
@@ -88,7 +112,11 @@ AsmCommonExceptionHandler proc
call HandleHostException
add rsp, 20h
POPAQ
add rsp, 10h ; Remove the error code and interrupt number.
;
; Remove the error code and interrupt number.
;
add rsp, 10h
iretq
AsmCommonExceptionHandler endp

View File

@@ -15,7 +15,6 @@
*/
VOID
AsmDefaultExceptionHandlers (
VOID
);
/*!
@@ -23,5 +22,4 @@ AsmDefaultExceptionHandlers (
*/
VOID
AsmNmiExceptionHandler (
VOID
);

View File

@@ -8,9 +8,9 @@
reused once they are set, even after they are "cleared".
For complete implementation, one can copy ReactOS's implementation if
licensing the project under GPL is acceptable. hvpp by wbenny has its own
implementation of bitmap but is actually influenced by ReactOS
implementation and such should be treated as GPL.
licensing the project under GPL is acceptable. hvpp by Petr Beneš has its
own implementation of bitmap but is actually influenced by ReactOS
implementation, and such, should be treated as GPL.
@author Satoshi Tanda

View File

@@ -34,21 +34,21 @@
fault (null pointer access) when it fires in the host code. The author
has not been able to find out the root cause and a fix.
*/
#if !defined(MDEPKG_NDEBUG)
#if defined(MDEPKG_NDEBUG)
#define MV_ASSERT(x)
#else
#define MV_ASSERT(x) \
if (!(x)) \
{ \
LOG_ERROR("ASSERT %a(%d): %a", __FILE__, __LINE__, #x); \
MV_PANIC(); \
} (VOID*)NULL
#else
#define MV_ASSERT(x)
#endif
#if !defined(MDEPKG_NDEBUG)
#define MV_VERIFY(x) MV_ASSERT(x)
#else
#if defined(MDEPKG_NDEBUG)
#define MV_VERIFY(x) (x)
#else
#define MV_VERIFY(x) MV_ASSERT(x)
#endif
#define MV_MAX(x, y) MAX((x), (y))