Andrew Scull | 2d527c2 | 2018-11-27 14:21:08 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2018 Google LLC |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * https://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | #include "hf/addr.h" |
Wedson Almeida Filho | 8e1da4f | 2018-12-16 16:34:48 +0000 | [diff] [blame] | 18 | #include "hf/mpool.h" |
Andrew Scull | 2d527c2 | 2018-11-27 14:21:08 +0000 | [diff] [blame] | 19 | |
| 20 | paddr_t plat_get_fdt_addr(void) |
| 21 | { |
| 22 | /* FDT is loaded at a known address. */ |
| 23 | return pa_init(0x82000000); |
| 24 | } |
| 25 | |
Wedson Almeida Filho | 8e1da4f | 2018-12-16 16:34:48 +0000 | [diff] [blame] | 26 | void plat_get_initrd_range(paddr_t *begin, paddr_t *end, struct mpool *ppool) |
Andrew Scull | 2d527c2 | 2018-11-27 14:21:08 +0000 | [diff] [blame] | 27 | { |
Wedson Almeida Filho | 8e1da4f | 2018-12-16 16:34:48 +0000 | [diff] [blame] | 28 | (void)ppool; |
| 29 | |
Andrew Scull | 2851947 | 2019-01-11 16:35:21 +0000 | [diff] [blame^] | 30 | /* |
| 31 | * initrd is loaded at a known address but... |
| 32 | * TODO: the size is hardcoded |
| 33 | */ |
Andrew Scull | 2d527c2 | 2018-11-27 14:21:08 +0000 | [diff] [blame] | 34 | *begin = pa_init(0x84000000); |
| 35 | *end = pa_add(*begin, 0x12EF200); |
| 36 | } |