aboutsummaryrefslogtreecommitdiff
path: root/src/mainboard/kontron/bsl6/variants/boxer26/romstage.c
blob: 9c14d84ea720ceba3ab02c81a4666b50806e9d87 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/* SPDX-License-Identifier: GPL-2.0-only */

#include <option.h>
#include <stdint.h>
#include <console/console.h>
#include <pc80/mc146818rtc.h>
#include <fsp/soc_binding.h>

#include "../../variant.h"

void variant_memory_init_params(FSPM_UPD *const mupd)
{
	char nvram_var[] = "ethernetx";
	unsigned int i;

	for (i = 0; i < 3; ++i) {
		u8 eth_enable = 1;
		nvram_var[sizeof(nvram_var) - 2] = '1' + i;
		get_option(&eth_enable, nvram_var);
		if (!eth_enable) {
			printk(BIOS_INFO, "Disabling ethernet%u.\n", 1 + i);
			mupd->FspmConfig.PcieRpEnableMask &= ~(1 << (i + 8));
		}
	}
}