Rev 756 | Rev 817 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 756 | Rev 794 | ||
---|---|---|---|
Line 142... | Line 142... | ||
142 | if (config.init_size > 0) { |
142 | if (config.init_size > 0) { |
143 | /* |
143 | /* |
144 | * Create the first user task. |
144 | * Create the first user task. |
145 | */ |
145 | */ |
146 | 146 | ||
147 | if (KA2PA(config.init_addr) % FRAME_SIZE) |
147 | if (config.init_addr % FRAME_SIZE) |
148 | panic("config.init_addr is not frame aligned"); |
148 | panic("config.init_addr is not frame aligned"); |
149 | 149 | ||
150 | as = as_create(0); |
150 | as = as_create(0); |
151 | if (!as) |
151 | if (!as) |
152 | panic("as_create\n"); |
152 | panic("as_create\n"); |
Line 159... | Line 159... | ||
159 | 159 | ||
160 | /* |
160 | /* |
161 | * Create the text as_area and initialize its mapping. |
161 | * Create the text as_area and initialize its mapping. |
162 | */ |
162 | */ |
163 | 163 | ||
164 | frame = KA2PA(config.init_addr); |
164 | frame = config.init_addr; |
- | 165 | if (IS_KA(frame)) |
|
- | 166 | frame = KA2PA(frame); |
|
- | 167 | ||
165 | frames = config.init_size / FRAME_SIZE; |
168 | frames = config.init_size / FRAME_SIZE; |
166 | if (config.init_size % FRAME_SIZE > 0) |
169 | if (config.init_size % FRAME_SIZE > 0) |
167 | frames++; |
170 | frames++; |
168 | 171 | ||
169 | a = as_area_create(as, AS_AREA_TEXT, frames, UTEXT_ADDRESS); |
172 | a = as_area_create(as, AS_AREA_TEXT, frames, UTEXT_ADDRESS); |