1.1 --- a/libexec/include/exec/stack.h Sun Jun 12 17:50:58 2022 +0200
1.2 +++ b/libexec/include/exec/stack.h Sun Jun 12 18:04:17 2022 +0200
1.3 @@ -22,8 +22,8 @@
1.4 #pragma once
1.5
1.6 #include <l4/re/env.h>
1.7 -#include <l4/re/l4aux.h>
1.8
1.9 +#include <exec/common.h>
1.10 #include <exec/segment.h>
1.11
1.12
1.13 @@ -34,13 +34,6 @@
1.14 {
1.15 protected:
1.16
1.17 - /* Auxiliary vector key-value pair. */
1.18 -
1.19 - struct auxv_entry
1.20 - {
1.21 - l4_umword_t key, value;
1.22 - };
1.23 -
1.24 /* Program segment holding the stack contents. */
1.25
1.26 Segment &_segment;
1.27 @@ -51,25 +44,30 @@
1.28
1.29 /* Stack section properties. */
1.30
1.31 - l4_addr_t _caps;
1.32 + l4_addr_t _regions = 0;
1.33 + l4_addr_t _caps = 0;
1.34 + int _num_caps = 0;
1.35 char *_arg_top, *_env_top;
1.36 char **_argv;
1.37 char *_auxv_end;
1.38 - int _env_entries;
1.39 + int _env_entries = 0;
1.40
1.41 /* L4Re auxiliary and environment regions. */
1.42
1.43 l4re_aux_t *_aux;
1.44 l4re_env_t *_env;
1.45
1.46 + /* Any indicated initial capabilities and regions. */
1.47 +
1.48 + l4re_env_cap_entry_t *_cap_entries = NULL;
1.49 + struct exec_region *_region_entries = NULL;
1.50 +
1.51 /* Stack pointer start address. */
1.52
1.53 l4_addr_t _start;
1.54
1.55 /* Internal stack population methods. */
1.56
1.57 - void push_cap_entries(l4re_env_cap_entry_t *entries);
1.58 -
1.59 void push_string(char *s);
1.60
1.61 void push_env(char *envp[]);
1.62 @@ -82,6 +80,10 @@
1.63
1.64 void push_auxv();
1.65
1.66 + void push_init_caps();
1.67 +
1.68 + void push_regions();
1.69 +
1.70 offset_t write_address(char *arg, char **addr, char *s);
1.71
1.72 void push_envp(char *envp[]);
1.73 @@ -93,6 +95,10 @@
1.74 public:
1.75 explicit Stack(Segment &segment);
1.76
1.77 + void set_init_caps(l4re_env_cap_entry_t *entries);
1.78 +
1.79 + void set_regions(struct exec_region *regions);
1.80 +
1.81 void set_l4re_aux(l4re_aux_t *aux);
1.82
1.83 void set_l4re_env(l4re_env_t *env);