Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
daea0b9b
Commit
daea0b9b
authored
Mar 06, 2024
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Allocate the data structure and stack for the ARM64EC emulator.
parent
5eb46419
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
0 deletions
+25
-0
thread.c
dlls/ntdll/unix/thread.c
+18
-0
virtual.c
dlls/ntdll/unix/virtual.c
+7
-0
No files found.
dlls/ntdll/unix/thread.c
View file @
daea0b9b
...
...
@@ -1218,6 +1218,24 @@ NTSTATUS init_thread_stack( TEB *teb, ULONG_PTR limit, SIZE_T reserve_size, SIZE
#endif
}
#ifdef __aarch64__
if
(
is_arm64ec
())
{
CHPE_V2_CPU_AREA_INFO
*
cpu_area
;
const
SIZE_T
chpev2_stack_size
=
0x40000
;
/* emulator stack */
if
((
status
=
virtual_alloc_thread_stack
(
&
stack
,
limit_4g
,
0
,
chpev2_stack_size
,
chpev2_stack_size
,
FALSE
)))
return
status
;
cpu_area
=
stack
.
DeallocationStack
;
cpu_area
->
ContextAmd64
=
(
ARM64EC_NT_CONTEXT
*
)
&
cpu_area
->
EmulatorDataInline
;
cpu_area
->
EmulatorStackBase
=
(
ULONG_PTR
)
stack
.
StackBase
;
cpu_area
->
EmulatorStackLimit
=
(
ULONG_PTR
)
stack
.
StackLimit
+
page_size
;
teb
->
ChpeV2CpuAreaInfo
=
cpu_area
;
}
#endif
/* native stack */
if
((
status
=
virtual_alloc_thread_stack
(
&
stack
,
0
,
limit
,
reserve_size
,
commit_size
,
TRUE
)))
return
status
;
...
...
dlls/ntdll/unix/virtual.c
View file @
daea0b9b
...
...
@@ -3758,6 +3758,13 @@ void virtual_free_teb( TEB *teb )
size
=
0
;
NtFreeVirtualMemory
(
GetCurrentProcess
(),
&
teb
->
DeallocationStack
,
&
size
,
MEM_RELEASE
);
}
#ifdef __aarch64__
if
(
teb
->
ChpeV2CpuAreaInfo
)
{
size
=
0
;
NtFreeVirtualMemory
(
GetCurrentProcess
(),
(
void
**
)
&
teb
->
ChpeV2CpuAreaInfo
,
&
size
,
MEM_RELEASE
);
}
#endif
if
(
thread_data
->
kernel_stack
)
{
size
=
0
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment