/* Needed, if called by the memory mode */
detect_dmi(hardware);
+ /* Detecting installed memory */
+ detect_memory(hardware);
+
more_printf("Memory Size : %lu MB (%lu KB)\n",
(hardware->detected_memory_size + (1 << 9)) >> 10,
hardware->detected_memory_size);
#include "hdt-common.h"
#include <disk/util.h>
#include <disk/mbrs.h>
+#include <memory.h>
/* ISOlinux requires a 8.3 format */
void convert_isolinux_filename(char *filename, struct s_hardware *hardware)
hardware->pxe_detection = false;
hardware->vesa_detection = false;
hardware->vpd_detection = false;
+ hardware->memory_detection = false;
hardware->nb_pci_devices = 0;
hardware->is_dmi_valid = false;
hardware->is_pxe_valid = false;
return 0;
}
+void detect_memory(struct s_hardware *hardware) {
+ if (hardware->memory_detection == false) {
+ hardware->memory_detection = true;
+ hardware->detected_memory_size = detect_memsize();
+ }
+}
+
void detect_pci(struct s_hardware *hardware)
{
if (hardware->pci_detection == true)
bool pxe_detection; /* Does the pxe stuff has already been detected? */
bool vesa_detection; /* Does the vesa sutff have been already detected? */
bool vpd_detection; /* Does the vpd stuff has already been detected? */
+ bool memory_detection; /* Does the memory size got detected ?*/
char syslinux_fs[22];
const struct syslinux_version *sv;
void detect_parameters(const int argc, const char *argv[],
struct s_hardware *hardware);
int detect_vesa(struct s_hardware *hardware);
+void detect_memory(struct s_hardware *hardware);
void init_console(struct s_hardware *hardware);
#endif
{
if (!quiet)
more_printf("MEMORY: Detecting\n");
- hardware->detected_memory_size = detect_memsize();
+ detect_memory(hardware);
if (!quiet)
more_printf("DMI: Detecting Table\n");