Vladimir Serbinenko (phcoder@gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/6792
-gerrit
commit d522c90c1ec60e4f891fbe84ff1bd5eb877783a6 Author: Vladimir Serbinenko phcoder@gmail.com Date: Thu Aug 28 00:43:48 2014 +0200
Set mobo type to notebook on laptops
Change-Id: Iabb46e4b0f0e786779125cd9379e29afa686ad82 Signed-off-by: Vladimir Serbinenko phcoder@gmail.com --- src/arch/x86/boot/smbios.c | 7 ++++++- src/mainboard/apple/macbook21/mainboard.c | 5 +++++ src/mainboard/getac/p470/mainboard.c | 5 +++++ src/mainboard/google/butterfly/mainboard.c | 5 +++++ src/mainboard/google/falco/mainboard.c | 5 +++++ src/mainboard/google/link/mainboard.c | 5 +++++ src/mainboard/google/parrot/mainboard.c | 5 +++++ src/mainboard/google/peppy/mainboard.c | 5 +++++ src/mainboard/google/snow/mainboard.c | 5 +++++ src/mainboard/google/stout/mainboard.c | 5 +++++ src/mainboard/hp/pavilion_m6_1035dx/mainboard.c | 5 +++++ src/mainboard/lenovo/t520/mainboard.c | 5 +++++ src/mainboard/lenovo/t530/mainboard.c | 5 +++++ src/mainboard/lenovo/t60/mainboard.c | 5 +++++ src/mainboard/lenovo/x200/mainboard.c | 5 +++++ src/mainboard/lenovo/x201/mainboard.c | 5 +++++ src/mainboard/lenovo/x220/mainboard.c | 5 +++++ src/mainboard/lenovo/x230/mainboard.c | 5 +++++ src/mainboard/lenovo/x60/mainboard.c | 5 +++++ src/mainboard/packardbell/ms2290/mainboard.c | 5 +++++ src/mainboard/roda/rk886ex/mainboard.c | 5 +++++ src/mainboard/roda/rk9/mainboard.c | 5 +++++ src/mainboard/samsung/lumpy/mainboard.c | 5 +++++ 23 files changed, 116 insertions(+), 1 deletion(-)
diff --git a/src/arch/x86/boot/smbios.c b/src/arch/x86/boot/smbios.c index 8437fb5..cb46c33 100644 --- a/src/arch/x86/boot/smbios.c +++ b/src/arch/x86/boot/smbios.c @@ -198,6 +198,11 @@ const char *__attribute__((weak)) smbios_mainboard_product_name(void) return CONFIG_MAINBOARD_SMBIOS_PRODUCT_NAME; }
+u8 __attribute__((weak)) smbios_mainboard_enclosure_type(void) +{ + return SMBIOS_ENCLOSURE_DESKTOP; +} + void __attribute__((weak)) smbios_mainboard_set_uuid(u8 *uuid) { /* leave all zero */ @@ -253,7 +258,7 @@ static int smbios_write_type3(unsigned long *current, int handle) t->bootup_state = SMBIOS_STATE_SAFE; t->power_supply_state = SMBIOS_STATE_SAFE; t->thermal_state = SMBIOS_STATE_SAFE; - t->_type = SMBIOS_ENCLOSURE_DESKTOP; + t->_type = smbios_mainboard_enclosure_type(); t->security_status = SMBIOS_STATE_SAFE; len = t->length + smbios_string_table_len(t->eos); *current += len; diff --git a/src/mainboard/apple/macbook21/mainboard.c b/src/mainboard/apple/macbook21/mainboard.c index b537f78..bb41b30 100644 --- a/src/mainboard/apple/macbook21/mainboard.c +++ b/src/mainboard/apple/macbook21/mainboard.c @@ -93,3 +93,8 @@ struct chip_operations mainboard_ops = { .enable_dev = mainboard_enable, };
+ +u8 smbios_mainboard_enclosure_type(void) +{ + return SMBIOS_ENCLOSURE_NOTEBOOK; +} diff --git a/src/mainboard/getac/p470/mainboard.c b/src/mainboard/getac/p470/mainboard.c index ac235d3..a273336 100644 --- a/src/mainboard/getac/p470/mainboard.c +++ b/src/mainboard/getac/p470/mainboard.c @@ -101,3 +101,8 @@ static void mainboard_enable(device_t dev) struct chip_operations mainboard_ops = { .enable_dev = mainboard_enable, }; + +u8 smbios_mainboard_enclosure_type(void) +{ + return SMBIOS_ENCLOSURE_NOTEBOOK; +} diff --git a/src/mainboard/google/butterfly/mainboard.c b/src/mainboard/google/butterfly/mainboard.c index 85b86cb..646d12e 100644 --- a/src/mainboard/google/butterfly/mainboard.c +++ b/src/mainboard/google/butterfly/mainboard.c @@ -390,3 +390,8 @@ static void mainboard_enable(device_t dev) struct chip_operations mainboard_ops = { .enable_dev = mainboard_enable, }; + +u8 smbios_mainboard_enclosure_type(void) +{ + return SMBIOS_ENCLOSURE_NOTEBOOK; +} diff --git a/src/mainboard/google/falco/mainboard.c b/src/mainboard/google/falco/mainboard.c index 38edb5c..7953712 100644 --- a/src/mainboard/google/falco/mainboard.c +++ b/src/mainboard/google/falco/mainboard.c @@ -200,3 +200,8 @@ static void mainboard_enable(device_t dev) struct chip_operations mainboard_ops = { .enable_dev = mainboard_enable, }; + +u8 smbios_mainboard_enclosure_type(void) +{ + return SMBIOS_ENCLOSURE_NOTEBOOK; +} diff --git a/src/mainboard/google/link/mainboard.c b/src/mainboard/google/link/mainboard.c index ee83089..1c20a9d 100644 --- a/src/mainboard/google/link/mainboard.c +++ b/src/mainboard/google/link/mainboard.c @@ -228,3 +228,8 @@ static void mainboard_enable(device_t dev) struct chip_operations mainboard_ops = { .enable_dev = mainboard_enable, }; + +u8 smbios_mainboard_enclosure_type(void) +{ + return SMBIOS_ENCLOSURE_NOTEBOOK; +} diff --git a/src/mainboard/google/parrot/mainboard.c b/src/mainboard/google/parrot/mainboard.c index 6aa3fca..d20229e 100644 --- a/src/mainboard/google/parrot/mainboard.c +++ b/src/mainboard/google/parrot/mainboard.c @@ -197,3 +197,8 @@ static void mainboard_enable(device_t dev) struct chip_operations mainboard_ops = { .enable_dev = mainboard_enable, }; + +u8 smbios_mainboard_enclosure_type(void) +{ + return SMBIOS_ENCLOSURE_NOTEBOOK; +} diff --git a/src/mainboard/google/peppy/mainboard.c b/src/mainboard/google/peppy/mainboard.c index 38edb5c..7953712 100644 --- a/src/mainboard/google/peppy/mainboard.c +++ b/src/mainboard/google/peppy/mainboard.c @@ -200,3 +200,8 @@ static void mainboard_enable(device_t dev) struct chip_operations mainboard_ops = { .enable_dev = mainboard_enable, }; + +u8 smbios_mainboard_enclosure_type(void) +{ + return SMBIOS_ENCLOSURE_NOTEBOOK; +} diff --git a/src/mainboard/google/snow/mainboard.c b/src/mainboard/google/snow/mainboard.c index f906e53..24eb614 100644 --- a/src/mainboard/google/snow/mainboard.c +++ b/src/mainboard/google/snow/mainboard.c @@ -367,3 +367,8 @@ void lb_board(struct lb_header *header) dma->range_start = (intptr_t)DMA_START; dma->range_size = DMA_SIZE; } + +u8 smbios_mainboard_enclosure_type(void) +{ + return SMBIOS_ENCLOSURE_NOTEBOOK; +} diff --git a/src/mainboard/google/stout/mainboard.c b/src/mainboard/google/stout/mainboard.c index b0ed3c1..aaff263 100644 --- a/src/mainboard/google/stout/mainboard.c +++ b/src/mainboard/google/stout/mainboard.c @@ -180,3 +180,8 @@ static void mainboard_enable(device_t dev) struct chip_operations mainboard_ops = { .enable_dev = mainboard_enable, }; + +u8 smbios_mainboard_enclosure_type(void) +{ + return SMBIOS_ENCLOSURE_NOTEBOOK; +} diff --git a/src/mainboard/hp/pavilion_m6_1035dx/mainboard.c b/src/mainboard/hp/pavilion_m6_1035dx/mainboard.c index 53c5342..8614453 100644 --- a/src/mainboard/hp/pavilion_m6_1035dx/mainboard.c +++ b/src/mainboard/hp/pavilion_m6_1035dx/mainboard.c @@ -58,3 +58,8 @@ static void mainboard_enable(device_t dev) struct chip_operations mainboard_ops = { .enable_dev = mainboard_enable, }; + +u8 smbios_mainboard_enclosure_type(void) +{ + return SMBIOS_ENCLOSURE_NOTEBOOK; +} diff --git a/src/mainboard/lenovo/t520/mainboard.c b/src/mainboard/lenovo/t520/mainboard.c index a0403f6..cc1492c 100644 --- a/src/mainboard/lenovo/t520/mainboard.c +++ b/src/mainboard/lenovo/t520/mainboard.c @@ -182,3 +182,8 @@ void h8_mainboard_init_dock (void) struct chip_operations mainboard_ops = { .enable_dev = mainboard_enable, }; + +u8 smbios_mainboard_enclosure_type(void) +{ + return SMBIOS_ENCLOSURE_NOTEBOOK; +} diff --git a/src/mainboard/lenovo/t530/mainboard.c b/src/mainboard/lenovo/t530/mainboard.c index c3425b3..713e652 100644 --- a/src/mainboard/lenovo/t530/mainboard.c +++ b/src/mainboard/lenovo/t530/mainboard.c @@ -185,3 +185,8 @@ void h8_mainboard_init_dock (void) struct chip_operations mainboard_ops = { .enable_dev = mainboard_enable, }; + +u8 smbios_mainboard_enclosure_type(void) +{ + return SMBIOS_ENCLOSURE_NOTEBOOK; +} diff --git a/src/mainboard/lenovo/t60/mainboard.c b/src/mainboard/lenovo/t60/mainboard.c index 9c6a30a..5e6a166 100644 --- a/src/mainboard/lenovo/t60/mainboard.c +++ b/src/mainboard/lenovo/t60/mainboard.c @@ -137,3 +137,8 @@ static void mainboard_enable(device_t dev) struct chip_operations mainboard_ops = { .enable_dev = mainboard_enable, }; + +u8 smbios_mainboard_enclosure_type(void) +{ + return SMBIOS_ENCLOSURE_NOTEBOOK; +} diff --git a/src/mainboard/lenovo/x200/mainboard.c b/src/mainboard/lenovo/x200/mainboard.c index df31463..0253214 100644 --- a/src/mainboard/lenovo/x200/mainboard.c +++ b/src/mainboard/lenovo/x200/mainboard.c @@ -148,3 +148,8 @@ struct chip_operations mainboard_ops = { .enable_dev = mainboard_enable, };
+ +u8 smbios_mainboard_enclosure_type(void) +{ + return SMBIOS_ENCLOSURE_NOTEBOOK; +} diff --git a/src/mainboard/lenovo/x201/mainboard.c b/src/mainboard/lenovo/x201/mainboard.c index fd11da8..14eb279 100644 --- a/src/mainboard/lenovo/x201/mainboard.c +++ b/src/mainboard/lenovo/x201/mainboard.c @@ -183,3 +183,8 @@ static void mainboard_enable(device_t dev) struct chip_operations mainboard_ops = { .enable_dev = mainboard_enable, }; + +u8 smbios_mainboard_enclosure_type(void) +{ + return SMBIOS_ENCLOSURE_NOTEBOOK; +} diff --git a/src/mainboard/lenovo/x220/mainboard.c b/src/mainboard/lenovo/x220/mainboard.c index 28cd814..7af58e1 100644 --- a/src/mainboard/lenovo/x220/mainboard.c +++ b/src/mainboard/lenovo/x220/mainboard.c @@ -195,3 +195,8 @@ void h8_mainboard_init_dock (void) struct chip_operations mainboard_ops = { .enable_dev = mainboard_enable, }; + +u8 smbios_mainboard_enclosure_type(void) +{ + return SMBIOS_ENCLOSURE_NOTEBOOK; +} diff --git a/src/mainboard/lenovo/x230/mainboard.c b/src/mainboard/lenovo/x230/mainboard.c index c017712..0ca0ccd 100644 --- a/src/mainboard/lenovo/x230/mainboard.c +++ b/src/mainboard/lenovo/x230/mainboard.c @@ -195,3 +195,8 @@ void h8_mainboard_init_dock (void) struct chip_operations mainboard_ops = { .enable_dev = mainboard_enable, }; + +u8 smbios_mainboard_enclosure_type(void) +{ + return SMBIOS_ENCLOSURE_NOTEBOOK; +} diff --git a/src/mainboard/lenovo/x60/mainboard.c b/src/mainboard/lenovo/x60/mainboard.c index 4472c0b..6b19645 100644 --- a/src/mainboard/lenovo/x60/mainboard.c +++ b/src/mainboard/lenovo/x60/mainboard.c @@ -153,3 +153,8 @@ static void mainboard_enable(device_t dev) struct chip_operations mainboard_ops = { .enable_dev = mainboard_enable, }; + +u8 smbios_mainboard_enclosure_type(void) +{ + return SMBIOS_ENCLOSURE_NOTEBOOK; +} diff --git a/src/mainboard/packardbell/ms2290/mainboard.c b/src/mainboard/packardbell/ms2290/mainboard.c index aca221a..8b663a3 100644 --- a/src/mainboard/packardbell/ms2290/mainboard.c +++ b/src/mainboard/packardbell/ms2290/mainboard.c @@ -174,3 +174,8 @@ static void mainboard_enable(device_t dev) struct chip_operations mainboard_ops = { .enable_dev = mainboard_enable, }; + +u8 smbios_mainboard_enclosure_type(void) +{ + return SMBIOS_ENCLOSURE_NOTEBOOK; +} diff --git a/src/mainboard/roda/rk886ex/mainboard.c b/src/mainboard/roda/rk886ex/mainboard.c index 7f188d4..7ad7c5a 100644 --- a/src/mainboard/roda/rk886ex/mainboard.c +++ b/src/mainboard/roda/rk886ex/mainboard.c @@ -136,3 +136,8 @@ static void mainboard_enable(device_t dev) struct chip_operations mainboard_ops = { .enable_dev = mainboard_enable, }; + +u8 smbios_mainboard_enclosure_type(void) +{ + return SMBIOS_ENCLOSURE_NOTEBOOK; +} diff --git a/src/mainboard/roda/rk9/mainboard.c b/src/mainboard/roda/rk9/mainboard.c index 4744415..50078fd 100644 --- a/src/mainboard/roda/rk9/mainboard.c +++ b/src/mainboard/roda/rk9/mainboard.c @@ -140,3 +140,8 @@ static void mainboard_enable(device_t dev) struct chip_operations mainboard_ops = { .enable_dev = mainboard_enable, }; + +u8 smbios_mainboard_enclosure_type(void) +{ + return SMBIOS_ENCLOSURE_NOTEBOOK; +} diff --git a/src/mainboard/samsung/lumpy/mainboard.c b/src/mainboard/samsung/lumpy/mainboard.c index ee6728f..8f81fa7 100644 --- a/src/mainboard/samsung/lumpy/mainboard.c +++ b/src/mainboard/samsung/lumpy/mainboard.c @@ -212,3 +212,8 @@ static void mainboard_enable(device_t dev) struct chip_operations mainboard_ops = { .enable_dev = mainboard_enable, }; + +u8 smbios_mainboard_enclosure_type(void) +{ + return SMBIOS_ENCLOSURE_NOTEBOOK; +}