bootloader: reduce verbosity
- Disable tracing where it's not needed by default - Convert some drpintf to TRACE statements - Comment some dprintf out completely in files that don't have a TRACE macro. Change-Id: I1f6062bce74bcf1dbf77bf7bccadeeb12a4df46c Reviewed-on: https://review.haiku-os.org/c/haiku/+/2370 Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
@@ -119,7 +119,7 @@ add_stage2_driver_settings(stage2_args* args)
|
|||||||
// TODO: split more intelligently
|
// TODO: split more intelligently
|
||||||
for (const char** arg = args->arguments;
|
for (const char** arg = args->arguments;
|
||||||
arg != NULL && args->arguments_count-- && arg[0] != NULL; arg++) {
|
arg != NULL && args->arguments_count-- && arg[0] != NULL; arg++) {
|
||||||
dprintf("adding args: '%s'\n", arg[0]);
|
//dprintf("adding args: '%s'\n", arg[0]);
|
||||||
add_safe_mode_settings((char*)arg[0]);
|
add_safe_mode_settings((char*)arg[0]);
|
||||||
}
|
}
|
||||||
return B_OK;
|
return B_OK;
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
#include <platform/openfirmware/devices.h>
|
#include <platform/openfirmware/devices.h>
|
||||||
#include <platform/openfirmware/openfirmware.h>
|
#include <platform/openfirmware/openfirmware.h>
|
||||||
|
|
||||||
#define TRACE_CPU
|
//#define TRACE_CPU
|
||||||
#ifdef TRACE_CPU
|
#ifdef TRACE_CPU
|
||||||
# define TRACE(x) dprintf x
|
# define TRACE(x) dprintf x
|
||||||
#else
|
#else
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ remove_virtual_range_to_keep(void *start, uint32 size)
|
|||||||
static status_t
|
static status_t
|
||||||
find_physical_memory_ranges(size_t &total)
|
find_physical_memory_ranges(size_t &total)
|
||||||
{
|
{
|
||||||
dprintf("checking for memory...\n");
|
TRACE("checking for memory...\n");
|
||||||
intptr_t package = of_instance_to_package(sMemoryInstance);
|
intptr_t package = of_instance_to_package(sMemoryInstance);
|
||||||
|
|
||||||
total = 0;
|
total = 0;
|
||||||
@@ -110,10 +110,10 @@ find_physical_memory_ranges(size_t &total)
|
|||||||
|
|
||||||
for (int32 i = 0; i < count; i++) {
|
for (int32 i = 0; i < count; i++) {
|
||||||
if (regions[i].size <= 0) {
|
if (regions[i].size <= 0) {
|
||||||
dprintf("%d: empty region\n", i);
|
TRACE("%d: empty region\n", i);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
dprintf("%" B_PRIu32 ": base = %" B_PRIx64 ","
|
TRACE("%" B_PRIu32 ": base = %" B_PRIx64 ","
|
||||||
"size = %" B_PRIx64 "\n", i, regions[i].base, regions[i].size);
|
"size = %" B_PRIx64 "\n", i, regions[i].base, regions[i].size);
|
||||||
|
|
||||||
total += regions[i].size;
|
total += regions[i].size;
|
||||||
@@ -225,7 +225,7 @@ find_allocated_ranges(void **_exceptionHandlers)
|
|||||||
}
|
}
|
||||||
length = length / sizeof(struct translation_map);
|
length = length / sizeof(struct translation_map);
|
||||||
uint32 total = 0;
|
uint32 total = 0;
|
||||||
dprintf("found %d translations\n", length);
|
TRACE("found %d translations\n", length);
|
||||||
|
|
||||||
for (int i = 0; i < length; i++) {
|
for (int i = 0; i < length; i++) {
|
||||||
struct translation_map *map = &translations[i];
|
struct translation_map *map = &translations[i];
|
||||||
@@ -271,7 +271,7 @@ find_allocated_ranges(void **_exceptionHandlers)
|
|||||||
|
|
||||||
total += map->length;
|
total += map->length;
|
||||||
}
|
}
|
||||||
dprintf("total size kept: %" B_PRIu32 "\n", total);
|
TRACE("total size kept: %" B_PRIu32 "\n", total);
|
||||||
|
|
||||||
// remove the boot loader code from the virtual ranges to keep in the
|
// remove the boot loader code from the virtual ranges to keep in the
|
||||||
// kernel
|
// kernel
|
||||||
@@ -576,7 +576,7 @@ arch_mmu_init(void)
|
|||||||
dprintf("Error: could not find physical memory ranges!\n");
|
dprintf("Error: could not find physical memory ranges!\n");
|
||||||
return B_ERROR;
|
return B_ERROR;
|
||||||
}
|
}
|
||||||
dprintf("total physical memory = %luMB\n", total / (1024 * 1024));
|
TRACE("total physical memory = %luMB\n", total / (1024 * 1024));
|
||||||
|
|
||||||
void *exceptionHandlers = (void *)-1;
|
void *exceptionHandlers = (void *)-1;
|
||||||
if (find_allocated_ranges(&exceptionHandlers) != B_OK) {
|
if (find_allocated_ranges(&exceptionHandlers) != B_OK) {
|
||||||
@@ -600,11 +600,11 @@ arch_mmu_init(void)
|
|||||||
|
|
||||||
// set kernel args
|
// set kernel args
|
||||||
|
|
||||||
dprintf("virt_allocated: %" B_PRIu32 "\n",
|
TRACE("virt_allocated: %" B_PRIu32 "\n",
|
||||||
gKernelArgs.num_virtual_allocated_ranges);
|
gKernelArgs.num_virtual_allocated_ranges);
|
||||||
dprintf("phys_allocated: %" B_PRIu32 "\n",
|
TRACE("phys_allocated: %" B_PRIu32 "\n",
|
||||||
gKernelArgs.num_physical_allocated_ranges);
|
gKernelArgs.num_physical_allocated_ranges);
|
||||||
dprintf("phys_memory: %" B_PRIu32 "\n",
|
TRACE("phys_memory: %" B_PRIu32 "\n",
|
||||||
gKernelArgs.num_physical_memory_ranges);
|
gKernelArgs.num_physical_memory_ranges);
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
#include <platform/openfirmware/openfirmware.h>
|
#include <platform/openfirmware/openfirmware.h>
|
||||||
|
|
||||||
|
|
||||||
#define TRACE_HEAP 1
|
//#define TRACE_HEAP 1
|
||||||
#if TRACE_HEAP
|
#if TRACE_HEAP
|
||||||
# define TRACE(x) printf x
|
# define TRACE(x) printf x
|
||||||
#else
|
#else
|
||||||
|
|||||||
Reference in New Issue
Block a user