diff options
author | Chris Metcalf <cmetcalf@tilera.com> | 2013-05-02 15:29:04 -0400 |
---|---|---|
committer | Chris Metcalf <cmetcalf@tilera.com> | 2013-05-02 16:20:31 -0400 |
commit | c539914dcd9a68c63305e055b14115a6a19578a8 (patch) | |
tree | b422139d5d4628c8472fdf740dced263bc238c30 /arch/tile/kernel/head_64.S | |
parent | c1be5a5b1b355d40e6cf79cc979eb66dafa24ad1 (diff) |
tile: support new Tilera hypervisor
The Tilera hypervisor shipped in releases up through MDE 4.1 launches
the client operating system (i.e. Linux) at privilege level 1 (PL1).
Starting with MDE 4.2, as part of the work to enable KVM, the
Tilera hypervisor launches Linux at PL2 instead.
This commit makes the KERNEL_PL option default to 2 for tilegx, while
still saying at 1 for tilepro, which doesn't have an updated hypervisor.
It also explains how and when you might want to choose another value.
In addition, we change a small buglet in the on-chip Ethernet driver,
where we were failing to use the KERNEL_PL constant in an API call.
To make the transition cleaner, this change also provides the updated
hv_init() API for the new hypervisor that supports announcing Linux's
compiled-in PL, so the hypervisor can generate a suitable error in the
case of a mismatched hypervisor and Linux binary.
Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Cc: stable@vger.linux.org
Diffstat (limited to 'arch/tile/kernel/head_64.S')
-rw-r--r-- | arch/tile/kernel/head_64.S | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/arch/tile/kernel/head_64.S b/arch/tile/kernel/head_64.S index f9a2734f7b82..6093964fa5c7 100644 --- a/arch/tile/kernel/head_64.S +++ b/arch/tile/kernel/head_64.S | |||
@@ -34,13 +34,19 @@ | |||
34 | ENTRY(_start) | 34 | ENTRY(_start) |
35 | /* Notify the hypervisor of what version of the API we want */ | 35 | /* Notify the hypervisor of what version of the API we want */ |
36 | { | 36 | { |
37 | #if KERNEL_PL == 1 && _HV_VERSION == 13 | ||
38 | /* Support older hypervisors by asking for API version 12. */ | ||
39 | movei r0, _HV_VERSION_OLD_HV_INIT | ||
40 | #else | ||
41 | movei r0, _HV_VERSION | ||
42 | #endif | ||
37 | movei r1, TILE_CHIP | 43 | movei r1, TILE_CHIP |
38 | movei r2, TILE_CHIP_REV | ||
39 | } | 44 | } |
40 | { | 45 | { |
41 | moveli r0, _HV_VERSION | 46 | movei r2, TILE_CHIP_REV |
42 | jal hv_init | 47 | movei r3, KERNEL_PL |
43 | } | 48 | } |
49 | jal hv_init | ||
44 | /* Get a reasonable default ASID in r0 */ | 50 | /* Get a reasonable default ASID in r0 */ |
45 | { | 51 | { |
46 | move r0, zero | 52 | move r0, zero |