All of lore.kernel.org
 help / color / mirror / Atom feed
* how aarch32 jump to aarch64
@ 2015-06-14 15:06 yoma sophian
  2015-06-14 19:39 ` Arnd Bergmann
  0 siblings, 1 reply; 5+ messages in thread
From: yoma sophian @ 2015-06-14 15:06 UTC (permalink / raw)
  To: linux-arm-kernel

hi all:
as far as I know, we can use pseudo eret to let aarch64 jump to aarch32.
But how could we let aarch32 --> aarch64?

appreciate your kind help,

^ permalink raw reply	[flat|nested] 5+ messages in thread

* how aarch32 jump to aarch64
  2015-06-14 15:06 how aarch32 jump to aarch64 yoma sophian
@ 2015-06-14 19:39 ` Arnd Bergmann
  2015-06-15  1:19   ` yoma sophian
  0 siblings, 1 reply; 5+ messages in thread
From: Arnd Bergmann @ 2015-06-14 19:39 UTC (permalink / raw)
  To: linux-arm-kernel

On Sunday 14 June 2015 23:06:49 yoma sophian wrote:
> hi all:
> as far as I know, we can use pseudo eret to let aarch64 jump to aarch32.
> But how could we let aarch32 --> aarch64?
> 

I believe the only way is to trap into a higher privilege level, e.g. from
user space to the kernel, or from kernel into hypervisor mode. If you
want to implement mode switching within one binary, you would then add
a syscall/hypercall/... that returns without switching back to aarch32.

	Arnd

^ permalink raw reply	[flat|nested] 5+ messages in thread

* how aarch32 jump to aarch64
  2015-06-14 19:39 ` Arnd Bergmann
@ 2015-06-15  1:19   ` yoma sophian
  2015-06-18 12:08     ` yoma sophian
  0 siblings, 1 reply; 5+ messages in thread
From: yoma sophian @ 2015-06-15  1:19 UTC (permalink / raw)
  To: linux-arm-kernel

hi Arnd:

2015-06-15 3:39 GMT+08:00 Arnd Bergmann <arnd@arndb.de>:
> On Sunday 14 June 2015 23:06:49 yoma sophian wrote:
>> hi all:
>> as far as I know, we can use pseudo eret to let aarch64 jump to aarch32.
>> But how could we let aarch32 --> aarch64?
>>
>
> I believe the only way is to trap into a higher privilege level, e.g. from
> user space to the kernel, or from kernel into hypervisor mode. If you
> want to implement mode switching within one binary, you would then add
> a syscall/hypercall/... that returns without switching back to aarch32.
Do you mean to use HVC, SVC, in aarch32?
But as far as I remember, they are exception instructions which let
processor jump to aarch32 hypervisio, and aarch32 supervisor mode
seperately.
Is there any exception instruction which will let aarch32 jump to aarch64?

Appreciate your help,

^ permalink raw reply	[flat|nested] 5+ messages in thread

* how aarch32 jump to aarch64
  2015-06-15  1:19   ` yoma sophian
@ 2015-06-18 12:08     ` yoma sophian
  2015-06-18 12:16       ` Christopher Covington
  0 siblings, 1 reply; 5+ messages in thread
From: yoma sophian @ 2015-06-18 12:08 UTC (permalink / raw)
  To: linux-arm-kernel

hi arnd:

2015-06-15 9:19 GMT+08:00 yoma sophian <sophian.yoma@gmail.com>:
> hi Arnd:
>
> 2015-06-15 3:39 GMT+08:00 Arnd Bergmann <arnd@arndb.de>:
>> On Sunday 14 June 2015 23:06:49 yoma sophian wrote:
>>> hi all:
>>> as far as I know, we can use pseudo eret to let aarch64 jump to aarch32.
>>> But how could we let aarch32 --> aarch64?
>>>
>>
>> I believe the only way is to trap into a higher privilege level, e.g. from
>> user space to the kernel, or from kernel into hypervisor mode. If you
>> want to implement mode switching within one binary, you would then add
>> a syscall/hypercall/... that returns without switching back to aarch32.
> Do you mean to use HVC, SVC, in aarch32?
> But as far as I remember, they are exception instructions which let
> processor jump to aarch32 hypervisio, and aarch32 supervisor mode
> seperately.
> Is there any exception instruction which will let aarch32 jump to aarch64?
in so far aarch64 kernel enviornemnt, the kernel is running in
Ns-aarch64-EL1 and user mode support aarch32 binary.
so there should be some instruction, which can let processor jump from
aarch32 --> aarch64, right?

appreciate your help,

^ permalink raw reply	[flat|nested] 5+ messages in thread

* how aarch32 jump to aarch64
  2015-06-18 12:08     ` yoma sophian
@ 2015-06-18 12:16       ` Christopher Covington
  0 siblings, 0 replies; 5+ messages in thread
From: Christopher Covington @ 2015-06-18 12:16 UTC (permalink / raw)
  To: linux-arm-kernel

On 06/18/2015 08:08 AM, yoma sophian wrote:
> hi arnd:
> 
> 2015-06-15 9:19 GMT+08:00 yoma sophian <sophian.yoma@gmail.com>:
>> hi Arnd:
>>
>> 2015-06-15 3:39 GMT+08:00 Arnd Bergmann <arnd@arndb.de>:
>>> On Sunday 14 June 2015 23:06:49 yoma sophian wrote:
>>>> hi all:
>>>> as far as I know, we can use pseudo eret to let aarch64 jump to aarch32.
>>>> But how could we let aarch32 --> aarch64?
>>>>
>>>
>>> I believe the only way is to trap into a higher privilege level, e.g. from
>>> user space to the kernel, or from kernel into hypervisor mode. If you
>>> want to implement mode switching within one binary, you would then add
>>> a syscall/hypercall/... that returns without switching back to aarch32.
>> Do you mean to use HVC, SVC, in aarch32?
>> But as far as I remember, they are exception instructions which let
>> processor jump to aarch32 hypervisio, and aarch32 supervisor mode
>> seperately.
>> Is there any exception instruction which will let aarch32 jump to aarch64?
> in so far aarch64 kernel enviornemnt, the kernel is running in
> Ns-aarch64-EL1 and user mode support aarch32 binary.
> so there should be some instruction, which can let processor jump from
> aarch32 --> aarch64, right?
> 
> appreciate your help,

The instruction is SVC, which has no ability to change the register width of
the destination exception level. If EL0 is AArch32 and EL1 is AArch64 then SVC
will cause an A32 -> A64 transition.

Chris

-- 
Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-06-18 12:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-14 15:06 how aarch32 jump to aarch64 yoma sophian
2015-06-14 19:39 ` Arnd Bergmann
2015-06-15  1:19   ` yoma sophian
2015-06-18 12:08     ` yoma sophian
2015-06-18 12:16       ` Christopher Covington

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.