Date: Thu, 16 Jul 2015 08:23:52 +0000 From: "wma_semihalf.com (Wojciech Macek)" <phabric-noreply@FreeBSD.org> To: freebsd-arm@freebsd.org Subject: [Differential] [Request, 3 lines] D3107: Fix ARM64 stack calculation Message-ID: <differential-rev-PHID-DREV-zqfyj4rhtcu6emsue7ys-req@FreeBSD.org>
index | next in thread | raw e-mail
[-- Attachment #1 --]
wma_semihalf.com created this revision.
wma_semihalf.com added reviewers: andoriyu_gmail.com, emaste, zbb.
wma_semihalf.com added a subscriber: freebsd-arm-list.
wma_semihalf.com set the repository for this revision to rS FreeBSD src repository.
Herald added subscribers: emaste, andrew, imp.
REVISION SUMMARY
Fixes in locore.s:
- opt_kstack_pages.h include was added to ensure the proper
KSTACK_PAGES value is used
- secondary stack calculation is modified to provide
stack_top = secondary_stacks + (cpu_id)*PAGE_SIZE*KSTACK_PAGES
because on ARMv8 the stack grows into lower memory addresses
REPOSITORY
rS FreeBSD src repository
REVISION DETAIL
https://reviews.freebsd.org/D3107
AFFECTED FILES
sys/arm64/arm64/locore.S
CHANGE DETAILS
diff --git a/sys/arm64/arm64/locore.S b/sys/arm64/arm64/locore.S
--- a/sys/arm64/arm64/locore.S
+++ b/sys/arm64/arm64/locore.S
@@ -182,8 +182,7 @@
mp_virtdone:
ldr x4, =secondary_stacks
mov x5, #(PAGE_SIZE * KSTACK_PAGES)
- sub x1, x0, #1
- mul x5, x1, x5
+ mul x5, x0, x5
add sp, x4, x5
b init_secondary
EMAIL PREFERENCES
https://reviews.freebsd.org/settings/panel/emailpreferences/
To: wma_semihalf.com, andoriyu_gmail.com, emaste, zbb
Cc: imp, andrew, freebsd-arm-list, emaste
[-- Attachment #2 --]
diff --git a/sys/arm64/arm64/locore.S b/sys/arm64/arm64/locore.S
--- a/sys/arm64/arm64/locore.S
+++ b/sys/arm64/arm64/locore.S
@@ -182,8 +182,7 @@
mp_virtdone:
ldr x4, =secondary_stacks
mov x5, #(PAGE_SIZE * KSTACK_PAGES)
- sub x1, x0, #1
- mul x5, x1, x5
+ mul x5, x0, x5
add sp, x4, x5
b init_secondary
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?differential-rev-PHID-DREV-zqfyj4rhtcu6emsue7ys-req>
