blob: 9aa0b58f016661cf8379c577bb4c28eefd8bb5d2 [file] [log] [blame]
Angel Pons118a9c72020-04-02 23:48:34 +02001/* SPDX-License-Identifier: GPL-2.0-only */
Ionela Voinescu00903e52015-01-09 13:14:20 +00002
3#include <program_loading.h>
Elyes Haouas1dc827a2022-10-02 20:23:14 +02004#include <types.h>
Ionela Voinescu00903e52015-01-09 13:14:20 +00005
6/* For each segment of a program loaded this function is called*/
Aaron Durbin096f4572016-03-31 13:49:00 -05007void prog_segment_loaded(uintptr_t start, size_t size, int flags)
8{
9 platform_segment_loaded(start, size, flags);
10 arch_segment_loaded(start, size, flags);
11}
12
Aaron Durbin64031672018-04-21 14:45:32 -060013void __weak platform_segment_loaded(uintptr_t start,
Aaron Durbin096f4572016-03-31 13:49:00 -050014 size_t size, int flags)
15{
16 /* do nothing */
17}
18
Aaron Durbin64031672018-04-21 14:45:32 -060019void __weak arch_segment_loaded(uintptr_t start, size_t size,
Aaron Durbin6e76fff2015-03-20 09:42:05 -050020 int flags)
Ionela Voinescu00903e52015-01-09 13:14:20 +000021{
22 /* do nothing */
23}
Aaron Durbinb3847e62015-03-20 15:55:08 -050024
25void prog_run(struct prog *prog)
26{
27 platform_prog_run(prog);
28 arch_prog_run(prog);
29}
30
Aaron Durbin64031672018-04-21 14:45:32 -060031void __weak platform_prog_run(struct prog *prog)
Aaron Durbinb3847e62015-03-20 15:55:08 -050032{
33 /* do nothing */
34}