LCOV - code coverage report
Current view: top level - arch/x86/kernel - platform-quirks.c (source / functions) Hit Total Coverage
Test: landlock.info Lines: 12 24 50.0 %
Date: 2021-04-22 12:43:58 Functions: 1 2 50.0 %

          Line data    Source code
       1             : // SPDX-License-Identifier: GPL-2.0
       2             : #include <linux/kernel.h>
       3             : #include <linux/init.h>
       4             : 
       5             : #include <asm/setup.h>
       6             : #include <asm/bios_ebda.h>
       7             : 
       8           1 : void __init x86_early_init_platform_quirks(void)
       9             : {
      10           1 :         x86_platform.legacy.i8042 = X86_LEGACY_I8042_EXPECTED_PRESENT;
      11           1 :         x86_platform.legacy.rtc = 1;
      12           1 :         x86_platform.legacy.warm_reset = 1;
      13           1 :         x86_platform.legacy.reserve_bios_regions = 0;
      14           1 :         x86_platform.legacy.devices.pnpbios = 1;
      15             : 
      16           1 :         switch (boot_params.hdr.hardware_subarch) {
      17           1 :         case X86_SUBARCH_PC:
      18           1 :                 x86_platform.legacy.reserve_bios_regions = 1;
      19           1 :                 break;
      20           0 :         case X86_SUBARCH_XEN:
      21           0 :                 x86_platform.legacy.devices.pnpbios = 0;
      22           0 :                 x86_platform.legacy.rtc = 0;
      23           0 :                 break;
      24           0 :         case X86_SUBARCH_INTEL_MID:
      25             :         case X86_SUBARCH_CE4100:
      26           0 :                 x86_platform.legacy.devices.pnpbios = 0;
      27           0 :                 x86_platform.legacy.rtc = 0;
      28           0 :                 x86_platform.legacy.i8042 = X86_LEGACY_I8042_PLATFORM_ABSENT;
      29           0 :                 break;
      30             :         }
      31             : 
      32           1 :         if (x86_platform.set_legacy_features)
      33           0 :                 x86_platform.set_legacy_features();
      34           1 : }
      35             : 
      36           0 : bool __init x86_pnpbios_disabled(void)
      37             : {
      38           0 :         return x86_platform.legacy.devices.pnpbios == 0;
      39             : }
      40             : 
      41             : #if defined(CONFIG_PNPBIOS)
      42             : bool __init arch_pnpbios_disabled(void)
      43             : {
      44             :         return x86_pnpbios_disabled();
      45             : }
      46             : #endif

Generated by: LCOV version 1.14