Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Aaron Hill
wine
Commits
b12ad4f4
Commit
b12ad4f4
authored
7 months ago
by
Billy Laws
Committed by
Alexandre Julliard
7 months ago
Browse files
Options
Downloads
Patches
Plain Diff
include: Move arm64ec_shared_info to winternl and point to it in the PEB.
From phnt headers.
parent
8bb96766
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
dlls/ntdll/ntdll_misc.h
+0
-13
0 additions, 13 deletions
dlls/ntdll/ntdll_misc.h
dlls/ntdll/process.c
+2
-2
2 additions, 2 deletions
dlls/ntdll/process.c
dlls/ntdll/signal_arm64ec.c
+4
-3
4 additions, 3 deletions
dlls/ntdll/signal_arm64ec.c
include/winternl.h
+69
-48
69 additions, 48 deletions
include/winternl.h
with
75 additions
and
66 deletions
dlls/ntdll/ntdll_misc.h
+
0
−
13
View file @
b12ad4f4
...
...
@@ -122,19 +122,6 @@ static inline void ascii_to_unicode( WCHAR *dst, const char *src, size_t len )
extern
TEB_FLS_DATA
*
fls_alloc_data
(
void
);
extern
void
heap_thread_detach
(
void
);
#if defined __aarch64__ || defined __arm64ec__
/* equivalent of WOW64INFO, stored after the 64-bit PEB */
struct
arm64ec_shared_info
{
ULONG
Wow64ExecuteFlags
;
USHORT
NativeMachineType
;
USHORT
EmulatedMachineType
;
HANDLE
SectionHandle
;
CROSS_PROCESS_WORK_LIST
*
CrossProcessWorkList
;
void
*
unknown
;
};
#endif
/* register context */
#ifdef __i386__
...
...
This diff is collapsed.
Click to expand it.
dlls/ntdll/process.c
+
2
−
2
View file @
b12ad4f4
...
...
@@ -328,10 +328,10 @@ void WINAPI RtlOpenCrossProcessEmulatorWorkConnection( HANDLE process, HANDLE *s
else
{
PROCESS_BASIC_INFORMATION
basic
;
struct
arm64ec_shared_info
info
;
CHPEV2_PROCESS_INFO
info
;
if
(
!
NtQueryInformationProcess
(
process
,
ProcessBasicInformation
,
&
basic
,
sizeof
(
basic
),
NULL
)
&&
!
NtReadVirtualMemory
(
process
,
(
PEB
*
)
basic
.
PebBaseAddress
+
1
,
&
info
,
sizeof
(
info
),
NULL
))
!
NtReadVirtualMemory
(
process
,
(
(
PEB
*
)
basic
.
PebBaseAddress
)
->
ChpeV2ProcessInfo
,
&
info
,
sizeof
(
info
),
NULL
))
handle
=
info
.
SectionHandle
;
}
#endif
...
...
This diff is collapsed.
Click to expand it.
dlls/ntdll/signal_arm64ec.c
+
4
−
3
View file @
b12ad4f4
...
...
@@ -76,7 +76,7 @@ static inline BOOL is_valid_arm64ec_frame( ULONG_PTR frame )
/**********************************************************************
* create_cross_process_work_list
*/
static
NTSTATUS
create_cross_process_work_list
(
struct
arm64ec_shared_info
*
info
)
static
NTSTATUS
create_cross_process_work_list
(
CHPEV2_PROCESS_INFO
*
info
)
{
SIZE_T
map_size
=
0x4000
;
LARGE_INTEGER
size
;
...
...
@@ -147,7 +147,7 @@ static BOOL send_cross_process_notification( HANDLE process, UINT id, const void
NTSTATUS
arm64ec_process_init
(
HMODULE
module
)
{
NTSTATUS
status
=
STATUS_SUCCESS
;
struct
arm64ec_shared_info
*
info
=
(
struct
arm64ec_shared_info
*
)(
RtlGetCurrentPeb
()
+
1
);
CHPEV2_PROCESS_INFO
*
info
=
(
CHPEV2_PROCESS_INFO
*
)(
RtlGetCurrentPeb
()
+
1
);
__os_arm64x_dispatch_call_no_redirect
=
RtlFindExportedRoutineByName
(
module
,
"ExitToX64"
);
__os_arm64x_dispatch_fptr
=
RtlFindExportedRoutineByName
(
module
,
"DispatchJump"
);
...
...
@@ -172,6 +172,7 @@ NTSTATUS arm64ec_process_init( HMODULE module )
GET_PTR
(
UpdateProcessorInformation
);
#undef GET_PTR
RtlGetCurrentPeb
()
->
ChpeV2ProcessInfo
=
info
;
info
->
NativeMachineType
=
IMAGE_FILE_MACHINE_ARM64
;
info
->
EmulatedMachineType
=
IMAGE_FILE_MACHINE_AMD64
;
...
...
@@ -744,7 +745,7 @@ static NTSTATUS WINAPI LdrpSetX64Information( ULONG type, ULONG_PTR input, void
*/
void
WINAPI
ProcessPendingCrossProcessEmulatorWork
(
void
)
{
struct
arm64ec_shared_info
*
info
=
(
struct
arm64ec_shared_info
*
)(
RtlGetCurrentPeb
()
+
1
)
;
CHPEV2_PROCESS_INFO
*
info
=
RtlGetCurrentPeb
()
->
ChpeV2ProcessInfo
;
CROSS_PROCESS_WORK_LIST
*
list
=
(
void
*
)
info
->
CrossProcessWorkList
;
CROSS_PROCESS_WORK_ENTRY
*
entry
;
BOOLEAN
flush
=
FALSE
;
...
...
This diff is collapsed.
Click to expand it.
include/winternl.h
+
69
−
48
View file @
b12ad4f4
...
...
@@ -291,6 +291,52 @@ typedef struct _TEB_FLS_DATA
void
**
fls_data_chunks
[
8
];
}
TEB_FLS_DATA
,
*
PTEB_FLS_DATA
;
/* undocumented layout of WOW64INFO.CrossProcessWorkList and CHPEV2_PROCESS_INFO.CrossProcessWorkList */
typedef
struct
{
UINT
next
;
UINT
id
;
ULONGLONG
addr
;
ULONGLONG
size
;
UINT
args
[
4
];
}
CROSS_PROCESS_WORK_ENTRY
;
typedef
union
{
struct
{
UINT
first
;
UINT
counter
;
};
volatile
LONGLONG
hdr
;
}
CROSS_PROCESS_WORK_HDR
;
typedef
struct
{
CROSS_PROCESS_WORK_HDR
free_list
;
CROSS_PROCESS_WORK_HDR
work_list
;
ULONGLONG
unknown
[
4
];
CROSS_PROCESS_WORK_ENTRY
entries
[
1
];
}
CROSS_PROCESS_WORK_LIST
;
typedef
enum
{
CrossProcessPreVirtualAlloc
=
0
,
CrossProcessPostVirtualAlloc
=
1
,
CrossProcessPreVirtualFree
=
2
,
CrossProcessPostVirtualFree
=
3
,
CrossProcessPreVirtualProtect
=
4
,
CrossProcessPostVirtualProtect
=
5
,
CrossProcessFlushCache
=
6
,
CrossProcessFlushCacheHeavy
=
7
,
CrossProcessMemoryWrite
=
8
,
}
CROSS_PROCESS_NOTIFICATION
;
#define CROSS_PROCESS_LIST_FLUSH 0x80000000
#define CROSS_PROCESS_LIST_ENTRY(list,pos) \
((CROSS_PROCESS_WORK_ENTRY *)((char *)(list) + ((pos) & ~CROSS_PROCESS_LIST_FLUSH)))
typedef
struct
_CHPE_V2_CPU_AREA_INFO
{
BOOLEAN
InSimulation
;
/* 000 */
...
...
@@ -304,6 +350,17 @@ typedef struct _CHPE_V2_CPU_AREA_INFO
ULONG64
EmulatorDataInline
;
/* 050 */
}
CHPE_V2_CPU_AREA_INFO
,
*
PCHPE_V2_CPU_AREA_INFO
;
/* equivalent of WOW64INFO, stored after the 64-bit PEB */
typedef
struct
_CHPEV2_PROCESS_INFO
{
ULONG
Wow64ExecuteFlags
;
/* 000 */
USHORT
NativeMachineType
;
/* 004 */
USHORT
EmulatedMachineType
;
/* 006 */
HANDLE
SectionHandle
;
/* 008 */
CROSS_PROCESS_WORK_LIST
*
CrossProcessWorkList
;
/* 010 */
void
*
unknown
;
/* 018 */
}
CHPEV2_PROCESS_INFO
,
*
PCHPEV2_PROCESS_INFO
;
#define TEB_ACTIVE_FRAME_CONTEXT_FLAG_EXTENDED 0x00000001
#define TEB_ACTIVE_FRAME_FLAG_EXTENDED 0x00000001
...
...
@@ -399,7 +456,13 @@ typedef struct _PEB
SIZE_T
MinimumStackCommit
;
/* 208/318 */
PVOID
*
FlsCallback
;
/* 20c/320 */
LIST_ENTRY
FlsListHead
;
/* 210/328 */
PRTL_BITMAP
FlsBitmap
;
/* 218/338 */
union
{
PRTL_BITMAP
FlsBitmap
;
/* 218/338 */
#ifdef _WIN64
CHPEV2_PROCESS_INFO
*
ChpeV2ProcessInfo
;
/* /338 */
#endif
};
ULONG
FlsBitmapBits
[
4
];
/* 21c/340 */
ULONG
FlsHighIndex
;
/* 22c/350 */
PVOID
WerRegistrationData
;
/* 230/358 */
...
...
@@ -951,7 +1014,11 @@ typedef struct _PEB64
ULONG64
MinimumStackCommit
;
/* 0318 */
ULONG64
FlsCallback
;
/* 0320 */
LIST_ENTRY64
FlsListHead
;
/* 0328 */
ULONG64
FlsBitmap
;
/* 0338 */
union
{
ULONG64
FlsBitmap
;
/* 0338 */
ULONG64
ChpeV2ProcessInfo
;
/* 0338 */
};
ULONG
FlsBitmapBits
[
4
];
/* 0340 */
ULONG
FlsHighIndex
;
/* 0350 */
ULONG64
WerRegistrationData
;
/* 0358 */
...
...
@@ -4213,52 +4280,6 @@ C_ASSERT( sizeof(WOW64INFO) == 40 );
#define WOW64_CPUFLAGS_MSFT64 0x01
#define WOW64_CPUFLAGS_SOFTWARE 0x02
/* undocumented layout of WOW64INFO.CrossProcessWorkList */
typedef
struct
{
UINT
next
;
UINT
id
;
ULONGLONG
addr
;
ULONGLONG
size
;
UINT
args
[
4
];
}
CROSS_PROCESS_WORK_ENTRY
;
typedef
union
{
struct
{
UINT
first
;
UINT
counter
;
};
volatile
LONGLONG
hdr
;
}
CROSS_PROCESS_WORK_HDR
;
typedef
struct
{
CROSS_PROCESS_WORK_HDR
free_list
;
CROSS_PROCESS_WORK_HDR
work_list
;
ULONGLONG
unknown
[
4
];
CROSS_PROCESS_WORK_ENTRY
entries
[
1
];
}
CROSS_PROCESS_WORK_LIST
;
typedef
enum
{
CrossProcessPreVirtualAlloc
=
0
,
CrossProcessPostVirtualAlloc
=
1
,
CrossProcessPreVirtualFree
=
2
,
CrossProcessPostVirtualFree
=
3
,
CrossProcessPreVirtualProtect
=
4
,
CrossProcessPostVirtualProtect
=
5
,
CrossProcessFlushCache
=
6
,
CrossProcessFlushCacheHeavy
=
7
,
CrossProcessMemoryWrite
=
8
,
}
CROSS_PROCESS_NOTIFICATION
;
#define CROSS_PROCESS_LIST_FLUSH 0x80000000
#define CROSS_PROCESS_LIST_ENTRY(list,pos) \
((CROSS_PROCESS_WORK_ENTRY *)((char *)(list) + ((pos) & ~CROSS_PROCESS_LIST_FLUSH)))
/* wow64.dll functions */
void
*
WINAPI
Wow64AllocateTemp
(
SIZE_T
);
void
WINAPI
Wow64ApcRoutine
(
ULONG_PTR
,
ULONG_PTR
,
ULONG_PTR
,
CONTEXT
*
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment