1 /* Copyright 2013-2014 IBM Corp.
2  *
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  * 	http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
12  * implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef __HOSTSERVICES_H
18 #define __HOSTSERVICES_H
19 
20 bool hservices_init(void);
21 void hservices_lid_preload(void);
22 bool hservices_lid_preload_complete(void);
23 
24 int host_services_occ_load(void);
25 int host_services_occ_start(void);
26 int host_services_occ_stop(void);
27 void host_services_occ_base_setup(void);
28 
29 /* No LID can be larger than 16M, but OCC lid is less than 1 MB */
30 
31 #define HBRT_LOAD_LID_SIZE     0x100000 /* 1MB */
32 
33 /* TODO: Detect OCC lid size at runtime */
34 
35 /* Homer and OCC area size */
36 #define HOMER_IMAGE_SIZE	0x400000 /* 4MB per-chip */
37 #define OCC_COMMON_SIZE		0x800000 /* 8MB */
38 
39 int find_master_and_slave_occ(uint64_t **master, uint64_t **slave,
40 			      int *nr_masters, int *nr_slaves);
41 
42 #endif /* __HOSTSERVICES_H */
43