blob: fbecb5e8cf30f41a7e71a622c3e69f16a27b7e37 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
/* Copyright 2018 The Chromium OS Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*
* SCP memory map
*/
#ifndef __CROS_EC_MEMMAP_H
#define __CROS_EC_MEMMAP_H
void scp_memmap_init(void);
/**
* Translate AP addr to SCP addr.
*
* @param ap_addr AP address to translate
* @param scp_addr Tranlated AP address
* @return EC_SUCCESS or EC_ERROR_INVAL
*/
int memmap_ap_to_scp(uintptr_t ap_addr, uintptr_t *scp_addr);
/**
* Translate SCP addr to AP addr.
*
* @param scp_addr SCP address to tranlate
* @param ap_addr Translated SCP address
* @return EC_SUCCESS or EC_ERROR_INVAL
*/
int memmap_scp_to_ap(uintptr_t scp_addr, uintptr_t *ap_addr);
/**
* Translate AP addr to SCP cache addr.
*
* @param ap_addr AP address to translate
* @param scp_addr Tranlated AP cache address
* @return EC_SUCCESS or EC_ERROR_INVAL
*/
int memmap_ap_to_scp_cache(uintptr_t ap_addr, uintptr_t *scp_addr);
/**
* Translate SCP addr to AP addr.
*
* @param scp_addr SCP cache address to tranlate
* @param ap_addr Translated SCP cache address
* @return EC_SUCCESS or EC_ERROR_INVAL
*/
int memmap_scp_cache_to_ap(uintptr_t scp_addr, uintptr_t *ap_addr);
#endif /* #ifndef __CROS_EC_MEMMAP_H */
|