New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
X64 boot fixes #115
X64 boot fixes #115
Changes from 1 commit
1a44b66
be9bd17
113fb47
44b87aa
7307870
750d672
b82fb5c
0cd5818
4362171
42ffa6a
5b165b5
d7a2a23
18fc357
2a7049f
630bc26
5d66904
1f0c22f
ac90cf4
28115a3
21fb0ba
9efd916
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,10 +27,10 @@ extern VOID FASTCALL CHECK_PAGED_CODE_RTL(char *file, int line); | |
#endif | ||
|
||
#define ROUND_DOWN(n, align) \ | ||
(((ULONG)(n)) & ~((align) - 1l)) | ||
(((ULONG_PTR)(n)) & ~((align) - 1l)) | ||
|
||
#define ROUND_UP(n, align) \ | ||
ROUND_DOWN(((ULONG)(n)) + (align) - 1, (align)) | ||
ROUND_DOWN(((ULONG_PTR)(n)) + (align) - 1, (align)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are there any ALIGN_MEM_...? Can't find them There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ok, these are called ALIGN_UP_... and ALIGN_DOWN_... : Also I think some other ROUND_UP (not necessary in the kernel, but in other places in the code, but related to manipulating (what would be 64 bits) points) may need fixup: |
||
|
||
#define RVA(m, b) ((PVOID)((ULONG_PTR)(b) + (ULONG_PTR)(m))) | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is x86 specific code. A proper fix would be using KeRosDumpStackFrames() or something similar. Alternatively use #ifdef _M_IX86 ... #else DbgPrint("FIXME: Backtrace skipped on non-x86\n") #endif
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, made it conditional. Didn't know that these is x86-specific.