mb/starlabs/*: Add a CMOS option to disable the GNA
Add an option, which defaults to disabled, to control whether the GNA (Gaussian Neural Accelerator) is enabled. This is a device that designed to handle AI tasks. Change-Id: I99f015cf1b5e21e8b524c4aa9bd3e94f86908ca1 Signed-off-by: Sean Rhodes <sean@starlabs.systems> Reviewed-on: https://review.coreboot.org/c/coreboot/+/85703 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
This commit is contained in:
parent
a7081a44bd
commit
89ddac998a
14 changed files with 39 additions and 0 deletions
|
|
@ -11,3 +11,4 @@ me_state=Disable
|
|||
# Devices
|
||||
wireless=Enable
|
||||
webcam=Enable
|
||||
gna=Disable
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ entries
|
|||
|
||||
# coreboot config options: Devices
|
||||
504 1 e 1 wireless
|
||||
512 1 e 1 gna
|
||||
|
||||
# coreboot config options: check sums
|
||||
984 16 h 0 check_sum
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ void devtree_update(void)
|
|||
&cfg->power_limits_config[ADL_N_041_6W_CORE];
|
||||
|
||||
struct device *nic_dev = pcidev_on_root(0x14, 3);
|
||||
struct device *gna_dev = pcidev_on_root(0x08, 0);
|
||||
|
||||
uint8_t performance_scale = 100;
|
||||
|
||||
|
|
@ -53,4 +54,8 @@ void devtree_update(void)
|
|||
cfg->usb2_ports[9].enable = 0;
|
||||
nic_dev->enabled = 0;
|
||||
}
|
||||
|
||||
/* Enable/Disable GNA based on CMOS settings */
|
||||
if (get_uint_option("gna", 0) == 0)
|
||||
gna_dev->enabled = 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ pci_hot_plug=Disable
|
|||
fingerprint_reader=Enable
|
||||
card_reader=Enable
|
||||
lid_switch=Enable
|
||||
gna=Disable
|
||||
# EC
|
||||
kbl_timeout=30 seconds
|
||||
fn_ctrl_swap=Disable
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ entries
|
|||
542 1 e 1 fingerprint_reader
|
||||
550 1 e 1 card_reader
|
||||
558 1 e 1 lid_switch
|
||||
566 1 e 1 gna
|
||||
|
||||
# coreboot config options: EC
|
||||
600 3 e 4 kbl_timeout
|
||||
|
|
|
|||
|
|
@ -22,6 +22,8 @@ void devtree_update(void)
|
|||
struct soc_power_limits_config *soc_conf_12core =
|
||||
&cfg->power_limits_config[ADL_P_682_28W_CORE];
|
||||
|
||||
struct device *gna_dev = pcidev_on_root(0x08, 0);
|
||||
|
||||
uint8_t performance_scale = 100;
|
||||
|
||||
/* Set PL4 to 1.0C */
|
||||
|
|
@ -69,4 +71,8 @@ void devtree_update(void)
|
|||
/* Enable/Disable Card Reader based on CMOS Settings */
|
||||
if (get_uint_option("card_reader", 1) == 0)
|
||||
cfg->usb2_ports[3].enable = 0;
|
||||
|
||||
/* Enable/Disable GNA based on CMOS settings */
|
||||
if (get_uint_option("gna", 0) == 0)
|
||||
gna_dev->enabled = 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ void devtree_update(void)
|
|||
|
||||
struct device *tbt_pci_dev = pcidev_on_root(0x07, 0);
|
||||
struct device *tbt_dma_dev = pcidev_on_root(0x0d, 2);
|
||||
struct device *gna_dev = pcidev_on_root(0x08, 0);
|
||||
|
||||
uint8_t performance_scale = 100;
|
||||
|
||||
|
|
@ -78,4 +79,8 @@ void devtree_update(void)
|
|||
tbt_pci_dev->enabled = 0;
|
||||
tbt_dma_dev->enabled = 0;
|
||||
}
|
||||
|
||||
/* Enable/Disable GNA based on CMOS settings */
|
||||
if (get_uint_option("gna", 0) == 0)
|
||||
gna_dev->enabled = 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ void devtree_update(void)
|
|||
struct device *nic_dev = pcidev_on_root(0x14, 3);
|
||||
struct device *tbt_pci_dev = pcidev_on_root(0x07, 0);
|
||||
struct device *tbt_dma_dev = pcidev_on_root(0x0d, 2);
|
||||
struct device *gna_dev = pcidev_on_root(0x08, 0);
|
||||
|
||||
uint8_t performance_scale = 100;
|
||||
|
||||
|
|
@ -73,4 +74,8 @@ void devtree_update(void)
|
|||
tbt_pci_dev->enabled = 0;
|
||||
tbt_dma_dev->enabled = 0;
|
||||
}
|
||||
|
||||
/* Enable/Disable GNA based on CMOS settings */
|
||||
if (get_uint_option("gna", 0) == 0)
|
||||
gna_dev->enabled = 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ webcam=Enable
|
|||
microphone=Enable
|
||||
pci_hot_plug=Disable
|
||||
lid_switch=Enable
|
||||
gna=Disable
|
||||
# EC
|
||||
kbl_timeout=30 seconds
|
||||
fn_ctrl_swap=Disable
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ entries
|
|||
512 1 e 1 webcam
|
||||
520 1 e 1 microphone
|
||||
528 1 e 1 lid_switch
|
||||
536 1 e 1 gna
|
||||
|
||||
# coreboot config options: EC
|
||||
600 3 e 4 kbl_timeout
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ void devtree_update(void)
|
|||
struct device *tbt_pci_dev_0 = pcidev_on_root(0x07, 0);
|
||||
struct device *tbt_pci_dev_1 = pcidev_on_root(0x07, 0);
|
||||
struct device *tbt_dma_dev = pcidev_on_root(0x0d, 2);
|
||||
struct device *gna_dev = pcidev_on_root(0x08, 0);
|
||||
|
||||
uint8_t performance_scale = 100;
|
||||
|
||||
|
|
@ -72,4 +73,8 @@ void devtree_update(void)
|
|||
tbt_pci_dev_1->enabled = 0;
|
||||
tbt_dma_dev->enabled = 0;
|
||||
}
|
||||
|
||||
/* Enable/Disable GNA based on CMOS settings */
|
||||
if (get_uint_option("gna", 0) == 0)
|
||||
gna_dev->enabled = 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,5 +16,6 @@ camera=Enable
|
|||
microphone=Enable
|
||||
lid_switch=Disable
|
||||
power_led=Normal
|
||||
gna=Disable
|
||||
# EC
|
||||
charging_speed=0.5C
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ entries
|
|||
528 1 e 1 microphone
|
||||
536 1 e 1 lid_switch
|
||||
542 1 e 9 power_led
|
||||
550 1 e 1 gna
|
||||
|
||||
# coreboot config options: EC
|
||||
600 2 e 6 max_charge
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ void devtree_update(void)
|
|||
struct device *nic_dev = pcidev_on_root(0x14, 3);
|
||||
struct device *touchscreen_dev = pcidev_on_root(0x15, 2);
|
||||
struct device *accelerometer_dev = pcidev_on_root(0x15, 0);
|
||||
struct device *gna_dev = pcidev_on_root(0x08, 0);
|
||||
|
||||
uint8_t performance_scale = 100;
|
||||
|
||||
|
|
@ -71,4 +72,8 @@ void devtree_update(void)
|
|||
/* Enable/Disable Accelerometer based on CMOS settings */
|
||||
if (get_uint_option("accelerometer", 1) == 0)
|
||||
accelerometer_dev->enabled = 0;
|
||||
|
||||
/* Enable/Disable GNA based on CMOS settings */
|
||||
if (get_uint_option("gna", 0) == 0)
|
||||
gna_dev->enabled = 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue