Angel Pons | 118a9c7 | 2020-04-02 23:48:34 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Ionela Voinescu | 00903e5 | 2015-01-09 13:14:20 +0000 | [diff] [blame] | 2 | |
| 3 | #include <program_loading.h> |
| 4 | |
| 5 | /* For each segment of a program loaded this function is called*/ |
Aaron Durbin | 096f457 | 2016-03-31 13:49:00 -0500 | [diff] [blame] | 6 | void prog_segment_loaded(uintptr_t start, size_t size, int flags) |
| 7 | { |
| 8 | platform_segment_loaded(start, size, flags); |
| 9 | arch_segment_loaded(start, size, flags); |
| 10 | } |
| 11 | |
Aaron Durbin | 6403167 | 2018-04-21 14:45:32 -0600 | [diff] [blame] | 12 | void __weak platform_segment_loaded(uintptr_t start, |
Aaron Durbin | 096f457 | 2016-03-31 13:49:00 -0500 | [diff] [blame] | 13 | size_t size, int flags) |
| 14 | { |
| 15 | /* do nothing */ |
| 16 | } |
| 17 | |
Aaron Durbin | 6403167 | 2018-04-21 14:45:32 -0600 | [diff] [blame] | 18 | void __weak arch_segment_loaded(uintptr_t start, size_t size, |
Aaron Durbin | 6e76fff | 2015-03-20 09:42:05 -0500 | [diff] [blame] | 19 | int flags) |
Ionela Voinescu | 00903e5 | 2015-01-09 13:14:20 +0000 | [diff] [blame] | 20 | { |
| 21 | /* do nothing */ |
| 22 | } |
Aaron Durbin | b3847e6 | 2015-03-20 15:55:08 -0500 | [diff] [blame] | 23 | |
| 24 | void prog_run(struct prog *prog) |
| 25 | { |
| 26 | platform_prog_run(prog); |
| 27 | arch_prog_run(prog); |
| 28 | } |
| 29 | |
Aaron Durbin | 6403167 | 2018-04-21 14:45:32 -0600 | [diff] [blame] | 30 | void __weak platform_prog_run(struct prog *prog) |
Aaron Durbin | b3847e6 | 2015-03-20 15:55:08 -0500 | [diff] [blame] | 31 | { |
| 32 | /* do nothing */ |
| 33 | } |