Add qemu 2.4.0
[kvmfornfv.git] / qemu / roms / SLOF / slof / ppc64.in
1 /******************************************************************************
2  * Copyright (c) 2004, 2008 IBM Corporation
3  * All rights reserved.
4  * This program and the accompanying materials
5  * are made available under the terms of the BSD License
6  * which accompanies this distribution, and is available at
7  * http://www.opensource.org/licenses/bsd-license.php
8  *
9  * Contributors:
10  *     IBM Corporation - initial implementation
11  *****************************************************************************/
12
13 // The Forth code words (primitives) that are specific to PowerPC64.
14
15 // CPU register accesses.
16 cod(HID0!)
17 cod(HID0@)
18 cod(HID1!)
19 cod(HID1@)
20 cod(HID4!)
21 cod(HID4@)
22 cod(HID5!)
23 cod(HID5@)
24 cod(MSR@)
25 cod(MSR!)
26 cod(SDR1@)
27 cod(SDR1!)
28 cod(PVR@)
29 cod(PIR@)
30 cod(TBL@)
31 cod(TBU@)
32 cod(DABR@)
33 cod(DABR!)
34 cod(HIOR@)
35 cod(HIOR!)
36 cod(SPRG0@)
37 cod(SPRG0!)
38 cod(SPRG1@)
39 cod(SPRG1!)
40 cod(SPRG2@)
41 cod(SPRG2!)
42 cod(SPRG3@)
43 cod(SPRG3!)
44 cod(HSPRG0@)
45 cod(HSPRG0!)
46 cod(HSPRG1@)
47 cod(HSPRG1!)
48 cod(DEC@)
49 cod(DEC!)
50
51 cod(MMCR0!)
52 cod(PMC1@)
53
54 cod(ICBI)
55
56
57 // The start address of a binary payload.
58 //con(PAYLOAD (type_u)_binary_payload_start)
59
60 // Calling the client program.
61 con(CLIENT-ENTRY-POINT (type_u)client_entry_point)
62 cod(JUMP-CLIENT)
63 dfr(CLIENTINTERFACE)
64
65
66 con(ROMFS-LOOKUP-ENTRY (type_u) c_romfs_lookup)
67
68 // not very elegant... but the only way it works for me
69 con(.WRITE-LOG-BYTE-ENTRY (type_u) writeLogByte_wrapper)
70 col(WRITE-LOG-BYTE-ENTRY .WRITE-LOG-BYTE-ENTRY @)
71
72 cod(CALL-C)
73 cod(START-RTAS)
74
75
76 cod(FLUSHCACHE)
77 // Bit map allocator
78 cod(BM-ALLOCATOR-INIT)
79 cod(BM-ALLOC)
80 cod(BM-FREE)
81
82 // Hang.
83 cod(CRASH)
84
85 var(DAAR 0x00f00000)
86 col(DUMBER DAAR @ C! LIT(1) DAAR +!)
87
88 dfr(BOOT-EXCEPTION-HANDLER)
89
90 col(NICEINIT DOTICK DROP DOTO EMIT DOTICK ((FIND)) DOTO (FIND) DOTICK 2DROP DOTO (REVEAL) LIT((type_u)_binary_OF_fsi_start) LIT((type_u)_binary_OF_fsi_end) OVER - DOTICK EVALUATE CATCH BOOT-EXCEPTION-HANDLER)
91
92 static cell xt_SYSTHROW[] = { _0 RDEPTH_X21 DUP LIT(0x100) _X3d _0BRANCH(5) SWAP DROP NICEINIT BRANCH(7) DUP LIT(0x3800) _X3d _0BRANCH(1) CLIENTINTERFACE PRINT_X2d_STATUS QUIT };
93
94 // sentinel, leave it here!
95 col(LASTWORD )
96