| 1 |
|
| 2 |
|
| 3 |
#include <boot/coreboot_tables.h> |
| 4 |
#include <console/cfr.h> |
| 5 |
#include <drivers/option/cfr_frontend.h> |
| 6 |
#include <ec/starlabs/merlin/cfr.h> |
| 7 |
#include <intelblocks/cfr.h> |
| 8 |
#include "cfr.h" |
| 9 |
|
| 10 |
static struct sm_obj_form performance = { |
| 11 |
.ui_name = "Performance", |
| 12 |
.obj_list = (const struct sm_object *[]) { |
| 13 |
&bluetooth_rtd3, |
| 14 |
&fan_mode, |
| 15 |
&power_profile, |
| 16 |
NULL |
| 17 |
}, |
| 18 |
}; |
| 19 |
|
| 20 |
static struct sm_obj_form processor = { |
| 21 |
.ui_name = "Processor", |
| 22 |
.obj_list = (const struct sm_object *[]) { |
| 23 |
&me_state, |
| 24 |
&me_state_counter, |
| 25 |
#if CONFIG(BOARD_SUPPORTS_HT) |
| 26 |
&hyper_threading, |
| 27 |
#endif |
| 28 |
&s0ix_enable, |
| 29 |
&vtd, |
| 30 |
NULL |
| 31 |
}, |
| 32 |
}; |
| 33 |
|
| 34 |
static struct sm_obj_form power = { |
| 35 |
.ui_name = "Power", |
| 36 |
.obj_list = (const struct sm_object *[]) { |
| 37 |
&max_charge, |
| 38 |
#if CONFIG(EC_STARLABS_CHARGING_SPEED) |
| 39 |
&charging_speed, |
| 40 |
#endif |
| 41 |
&power_on_after_fail_bool, |
| 42 |
NULL |
| 43 |
}, |
| 44 |
}; |
| 45 |
|
| 46 |
static struct sm_obj_form keyboard = { |
| 47 |
.ui_name = "Keyboard", |
| 48 |
.obj_list = (const struct sm_object *[]) { |
| 49 |
&kbl_timeout, |
| 50 |
&fn_ctrl_swap, |
| 51 |
NULL |
| 52 |
}, |
| 53 |
}; |
| 54 |
|
| 55 |
static struct sm_obj_form devices = { |
| 56 |
.ui_name = "Devices", |
| 57 |
.obj_list = (const struct sm_object *[]) { |
| 58 |
&card_reader, |
| 59 |
#if CONFIG(BOARD_USES_FIXED_MODE_VBT) |
| 60 |
&display_native_res, |
| 61 |
#endif |
| 62 |
#if CONFIG(BOARD_HAS_FPR) |
| 63 |
&fingerprint_reader, |
| 64 |
#endif |
| 65 |
#if CONFIG(BOARD_HAS_GNA) |
| 66 |
&gna, |
| 67 |
#endif |
| 68 |
#if CONFIG(EC_STARLABS_LID_SWITCH) |
| 69 |
&lid_switch, |
| 70 |
#endif |
| 71 |
µphone, |
| 72 |
#if CONFIG(DRIVERS_INTEL_USB4_RETIMER) |
| 73 |
&thunderbolt, |
| 74 |
#endif |
| 75 |
#if CONFIG(SOC_INTEL_METEORLAKE) |
| 76 |
&vpu, |
| 77 |
#endif |
| 78 |
&webcam, |
| 79 |
&wireless, |
| 80 |
NULL |
| 81 |
}, |
| 82 |
}; |
| 83 |
|
| 84 |
static struct sm_obj_form pci = { |
| 85 |
.ui_name = "PCI", |
| 86 |
.obj_list = (const struct sm_object *[]) { |
| 87 |
#if CONFIG(BOARD_STARLABS_STARBOOK_ADL) |
| 88 |
&pci_hot_plug, |
| 89 |
#endif |
| 90 |
#if CONFIG(SOC_INTEL_COMMON_BLOCK_ASPM) |
| 91 |
&pciexp_clk_pm, |
| 92 |
&pciexp_aspm, |
| 93 |
#if CONFIG(HAS_INTEL_CPU_ROOT_PORTS) |
| 94 |
&pciexp_aspm_cpu, |
| 95 |
#endif |
| 96 |
&pciexp_l1ss, |
| 97 |
#endif |
| 98 |
NULL |
| 99 |
}, |
| 100 |
}; |
| 101 |
|
| 102 |
static struct sm_obj_form coreboot = { |
| 103 |
.ui_name = "coreboot", |
| 104 |
.obj_list = (const struct sm_object *[]) { |
| 105 |
&debug_level, |
| 106 |
NULL |
| 107 |
}, |
| 108 |
}; |
| 109 |
|
| 110 |
static struct sm_obj_form *sm_root[] = { |
| 111 |
&performance, |
| 112 |
&processor, |
| 113 |
&power, |
| 114 |
&keyboard, |
| 115 |
&devices, |
| 116 |
&pci, |
| 117 |
&coreboot, |
| 118 |
NULL |
| 119 |
}; |
| 120 |
|
| 121 |
void mb_cfr_setup_menu(struct lb_cfr *cfr_root) |
| 122 |
{ |
| 123 |
cfr_write_setup_menu(cfr_root, sm_root); |
| 124 |
} |