Separate benchmark from smbus/smbios and add a separate flag to enable/disable it

This commit is contained in:
Sam Demeulemeester 2022-04-01 20:34:52 +02:00
parent 4a20637f8e
commit ee80684c4f
4 changed files with 11 additions and 6 deletions

View File

@ -94,6 +94,7 @@ bool enable_temperature = false;
bool enable_trace = false;
bool enable_sm = true;
bool enable_bench = true;
bool pause_at_start = false;
@ -118,6 +119,8 @@ static void parse_option(const char *option, const char *params)
}
} else if (strncmp(option, "nopause", 8) == 0) {
pause_at_start = false;
} else if (strncmp(option, "nobench", 8) == 0) {
enable_bench = false;
} else if (strncmp(option, "powersave", 10) == 0) {
if (strncmp(params, "off", 4) == 0) {
power_save = POWER_SAVE_OFF;

View File

@ -49,6 +49,7 @@ extern bool enable_temperature;
extern bool enable_trace;
extern bool enable_sm;
extern bool enable_bench;
extern bool pause_at_start;

View File

@ -210,9 +210,7 @@ static void global_init(void)
pci_init();
if(enable_sm) {
membw_init();
}
smbios_init();

View File

@ -21,6 +21,7 @@
#include "tsc.h"
#include "boot.h"
#include "config.h"
#include "pmem.h"
#include "vmem.h"
#include "memsize.h"
@ -1088,5 +1089,7 @@ void cpuinfo_init(void)
void membw_init(void)
{
if(enable_bench) {
measure_memory_bandwidth();
}
}