Merge tag 'v9.0.0-rc3'
[qemu/ar7.git] / pc-bios / vof / entry.S
blob10a101fb6d718c9cc3d46c50c79a8c9d54202ddb
1 #define LOAD32(rn, name)    \
2         lis     rn,name##@h;    \
3         ori     rn,rn,name##@l
5 #define ENTRY(func_name)    \
6         .text;                  \
7         .align  2;              \
8         .globl  .func_name;     \
9         .func_name:             \
10         .globl  func_name;      \
11         func_name:
13 #define KVMPPC_HCALL_BASE       0xf000
14 #define KVMPPC_H_RTAS           (KVMPPC_HCALL_BASE + 0x0)
15 #define KVMPPC_H_VOF_CLIENT     (KVMPPC_HCALL_BASE + 0x5)
17         . = 0x100 /* Do exactly as SLOF does */
19 ENTRY(_start)
20         LOAD32(2, __toc_start)
21         b entry_c
23 ENTRY(_prom_entry)
24         LOAD32(2, __toc_start)
25         stwu    %r1,-112(%r1)
26         stw     %r31,104(%r1)
27         mflr    %r31
28         bl prom_entry
29         nop
30         mtlr    %r31
31         lwz     %r31,104(%r1)
32         addi    %r1,%r1,112
33         blr
35 ENTRY(ci_entry)
36         mr      4,3
37         LOAD32(3,KVMPPC_H_VOF_CLIENT)
38         sc      1
39         blr
41 /* This is the actual RTAS blob copied to the OS at instantiate-rtas */
42 ENTRY(hv_rtas)
43         mr      %r4,%r3
44         LOAD32(3,KVMPPC_H_RTAS)
45         sc      1
46         blr
47         .globl hv_rtas_size
48 hv_rtas_size:
49         .long . - hv_rtas;