Revision b480d9b7 exec.c

b/exec.c
2217 2217
};
2218 2218

  
2219 2219
static int walk_memory_regions_end(struct walk_memory_regions_data *data,
2220
                                   unsigned long end, int new_prot)
2220
                                   abi_ulong end, int new_prot)
2221 2221
{
2222 2222
    if (data->start != -1ul) {
2223 2223
        int rc = data->fn(data->priv, data->start, end, data->prot);
......
2233 2233
}
2234 2234

  
2235 2235
static int walk_memory_regions_1(struct walk_memory_regions_data *data,
2236
                                 unsigned long base, int level, void **lp)
2236
                                 abi_ulong base, int level, void **lp)
2237 2237
{
2238
    unsigned long pa;
2238
    abi_ulong pa;
2239 2239
    int i, rc;
2240 2240

  
2241 2241
    if (*lp == NULL) {
......
2258 2258
    } else {
2259 2259
        void **pp = *lp;
2260 2260
        for (i = 0; i < L2_BITS; ++i) {
2261
            pa = base | (i << (TARGET_PAGE_BITS + L2_BITS * level));
2261
            pa = base | ((abi_ulong)i <<
2262
                (TARGET_PAGE_BITS + L2_BITS * level));
2262 2263
            rc = walk_memory_regions_1(data, pa, level - 1, pp + i);
2263 2264
            if (rc != 0) {
2264 2265
                return rc;
......
2280 2281
    data.prot = 0;
2281 2282

  
2282 2283
    for (i = 0; i < V_L1_SIZE; i++) {
2283
        int rc = walk_memory_regions_1(&data, i << V_L1_SHIFT,
2284
        int rc = walk_memory_regions_1(&data, (abi_ulong)i << V_L1_SHIFT,
2284 2285
                                       V_L1_SHIFT / L2_BITS - 1, l1_map + i);
2285 2286
        if (rc != 0) {
2286 2287
            return rc;
......
2290 2291
    return walk_memory_regions_end(&data, 0, 0);
2291 2292
}
2292 2293

  
2293
static int dump_region(void *priv, unsigned long start,
2294
    unsigned long end, unsigned long prot)
2294
static int dump_region(void *priv, abi_ulong start,
2295
    abi_ulong end, unsigned long prot)
2295 2296
{
2296 2297
    FILE *f = (FILE *)priv;
2297 2298

  
2298
    (void) fprintf(f, "%08lx-%08lx %08lx %c%c%c\n",
2299
    (void) fprintf(f, TARGET_ABI_FMT_lx"-"TARGET_ABI_FMT_lx
2300
        " "TARGET_ABI_FMT_lx" %c%c%c\n",
2299 2301
        start, end, end - start,
2300 2302
        ((prot & PAGE_READ) ? 'r' : '-'),
2301 2303
        ((prot & PAGE_WRITE) ? 'w' : '-'),
......
2332 2334
    /* This function should never be called with addresses outside the
2333 2335
       guest address space.  If this assert fires, it probably indicates
2334 2336
       a missing call to h2g_valid.  */
2335
#if HOST_LONG_BITS > L1_MAP_ADDR_SPACE_BITS
2336
    assert(end < (1ul << L1_MAP_ADDR_SPACE_BITS));
2337
#if TARGET_ABI_BITS > L1_MAP_ADDR_SPACE_BITS
2338
    assert(end < ((abi_ulong)1 << L1_MAP_ADDR_SPACE_BITS));
2337 2339
#endif
2338 2340
    assert(start < end);
2339 2341

  

Also available in: Unified diff