process.cc (12588:c007da6c777a) process.cc (13028:9a09c342891e)
1/*
2 * Copyright (c) 2014 Advanced Micro Devices, Inc.
3 * Copyright (c) 2007 The Hewlett-Packard Development Company
4 * All rights reserved.
5 *
6 * The license below extends only to copyright in the software and shall
7 * not be construed as granting a license to any other intellectual
8 * property including but not limited to intellectual property relating

--- 986 unchanged lines hidden (view full) ---

995 // Write out the sentry void *
996 IntType sentry_NULL = 0;
997 initVirtMem.writeBlob(sentry_base, (uint8_t*)&sentry_NULL, sentry_size);
998
999 // Write the file name
1000 initVirtMem.writeString(file_name_base, filename.c_str());
1001
1002 // Fix up the aux vectors which point to data
1/*
2 * Copyright (c) 2014 Advanced Micro Devices, Inc.
3 * Copyright (c) 2007 The Hewlett-Packard Development Company
4 * All rights reserved.
5 *
6 * The license below extends only to copyright in the software and shall
7 * not be construed as granting a license to any other intellectual
8 * property including but not limited to intellectual property relating

--- 986 unchanged lines hidden (view full) ---

995 // Write out the sentry void *
996 IntType sentry_NULL = 0;
997 initVirtMem.writeBlob(sentry_base, (uint8_t*)&sentry_NULL, sentry_size);
998
999 // Write the file name
1000 initVirtMem.writeString(file_name_base, filename.c_str());
1001
1002 // Fix up the aux vectors which point to data
1003 assert(auxv[auxv.size() - 3].a_type == M5_AT_RANDOM);
1004 auxv[auxv.size() - 3].a_val = aux_data_base;
1005 assert(auxv[auxv.size() - 2].a_type == M5_AT_EXECFN);
1006 auxv[auxv.size() - 2].a_val = argv_array_base;
1007 assert(auxv[auxv.size() - 1].a_type == M5_AT_PLATFORM);
1008 auxv[auxv.size() - 1].a_val = aux_data_base + numRandomBytes;
1003 assert(auxv[auxv.size() - 3].getHostAuxType() == M5_AT_RANDOM);
1004 auxv[auxv.size() - 3].setAuxVal(aux_data_base);
1005 assert(auxv[auxv.size() - 2].getHostAuxType() == M5_AT_EXECFN);
1006 auxv[auxv.size() - 2].setAuxVal(argv_array_base);
1007 assert(auxv[auxv.size() - 1].getHostAuxType() == M5_AT_PLATFORM);
1008 auxv[auxv.size() - 1].setAuxVal(aux_data_base + numRandomBytes);
1009
1010
1011 // Copy the aux stuff
1012 for (int x = 0; x < auxv.size(); x++) {
1013 initVirtMem.writeBlob(auxv_array_base + x * 2 * intSize,
1009
1010
1011 // Copy the aux stuff
1012 for (int x = 0; x < auxv.size(); x++) {
1013 initVirtMem.writeBlob(auxv_array_base + x * 2 * intSize,
1014 (uint8_t*)&(auxv[x].a_type), intSize);
1014 (uint8_t*)&(auxv[x].getAuxType()),
1015 intSize);
1015 initVirtMem.writeBlob(auxv_array_base + (x * 2 + 1) * intSize,
1016 initVirtMem.writeBlob(auxv_array_base + (x * 2 + 1) * intSize,
1016 (uint8_t*)&(auxv[x].a_val), intSize);
1017 (uint8_t*)&(auxv[x].getAuxVal()),
1018 intSize);
1017 }
1018 // Write out the terminating zeroed auxiliary vector
1019 const uint64_t zero = 0;
1020 initVirtMem.writeBlob(auxv_array_base + auxv.size() * 2 * intSize,
1021 (uint8_t*)&zero, intSize);
1022 initVirtMem.writeBlob(auxv_array_base + (auxv.size() * 2 + 1) * intSize,
1023 (uint8_t*)&zero, intSize);
1024

--- 100 unchanged lines hidden ---
1019 }
1020 // Write out the terminating zeroed auxiliary vector
1021 const uint64_t zero = 0;
1022 initVirtMem.writeBlob(auxv_array_base + auxv.size() * 2 * intSize,
1023 (uint8_t*)&zero, intSize);
1024 initVirtMem.writeBlob(auxv_array_base + (auxv.size() * 2 + 1) * intSize,
1025 (uint8_t*)&zero, intSize);
1026

--- 100 unchanged lines hidden ---