[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 2/9] fix x86_64 asm for higher kernel addresses
From: |
Samuel Thibault |
Subject: |
Re: [PATCH 2/9] fix x86_64 asm for higher kernel addresses |
Date: |
Sun, 12 Feb 2023 18:41:29 +0100 |
User-agent: |
NeoMutt/20170609 (1.8.3) |
Applied, thanks!
Luca Dariz, le dim. 12 févr. 2023 18:28:11 +0100, a ecrit:
> * x86_64/interrupt.S: use 64-bit registers as variables could be
> stored at high addresses
> * x86_64/locore.S: Likewise
> ---
> x86_64/interrupt.S | 4 ++--
> x86_64/locore.S | 6 ++----
> 2 files changed, 4 insertions(+), 6 deletions(-)
>
> diff --git a/x86_64/interrupt.S b/x86_64/interrupt.S
> index fe2b3858..31f386ec 100644
> --- a/x86_64/interrupt.S
> +++ b/x86_64/interrupt.S
> @@ -59,10 +59,10 @@ ENTRY(interrupt)
>
> movl S_IRQ,%eax /* copy irq number */
> shll $2,%eax /* irq * 4 */
> - movl EXT(iunit)(%eax),%edi /* get device unit number as 1st arg */
> + movl EXT(iunit)(%rax),%edi /* get device unit number as 1st arg */
>
> shll $1,%eax /* irq * 8 */
> - call *EXT(ivect)(%eax) /* call interrupt handler */
> + call *EXT(ivect)(%rax) /* call interrupt handler */
>
> movl S_IPL,%edi /* restore previous ipl */
> call splx_cli /* restore previous ipl */
> diff --git a/x86_64/locore.S b/x86_64/locore.S
> index 95ece3cc..c54b5cd8 100644
> --- a/x86_64/locore.S
> +++ b/x86_64/locore.S
> @@ -1152,7 +1152,7 @@ syscall_native:
> #endif
> shll $5,%eax /* manual indexing of mach_trap_t */
> xorq %r10,%r10
> - movl EXT(mach_trap_table)(%eax),%r10d
> + mov EXT(mach_trap_table)(%rax),%r10
> /* get number of arguments */
> andq %r10,%r10
> jz mach_call_call /* skip argument copy if none */
> @@ -1199,9 +1199,7 @@ mach_call_call:
> /* will return with syscallofs still (or again) in eax */
> 0:
> #endif /* DEBUG */
> -
> - call *EXT(mach_trap_table)+8(%eax)
> - /* call procedure */
> + call *EXT(mach_trap_table)+8(%rax) /* call procedure */
> movq %rsp,%rcx /* get kernel stack */
> or $(KERNEL_STACK_SIZE-1),%rcx
> movq -7-IKS_SIZE(%rcx),%rsp /* switch back to PCB stack */
> --
> 2.30.2
>
>
--
Samuel
---
Pour une évaluation indépendante, transparente et rigoureuse !
Je soutiens la Commission d'Évaluation de l'Inria.
- [PATCH 0/9 gnumach] move kernel vm map to high addresses on x86_64, Luca Dariz, 2023/02/12
- [PATCH 6/9] add more explicit names for user space virtual space limits, Luca Dariz, 2023/02/12
- [PATCH 5/9] use L4 page table directly on x86_64 instead of short-circuiting to pdpbase, Luca Dariz, 2023/02/12
- [PATCH 1/9] prepare pmap helpers for full 64 bit memory map, Luca Dariz, 2023/02/12
- [PATCH 2/9] fix x86_64 asm for higher kernel addresses, Luca Dariz, 2023/02/12
- Re: [PATCH 2/9] fix x86_64 asm for higher kernel addresses,
Samuel Thibault <=
- [PATCH 3/9] factor out xen-specific bootstrap, Luca Dariz, 2023/02/12
- [PATCH 4/9] factor out PAE-specific bootstrap, Luca Dariz, 2023/02/12
- [PATCH 7/9] extend data types to hold a 64-bit address, Luca Dariz, 2023/02/12
- [PATCH 9/9] move kernel virtual address space to upper addresses, Luca Dariz, 2023/02/12
- [PATCH 8/9] separate initialization of kernel and user PTP tables, Luca Dariz, 2023/02/12