platform-quirks.c 797 B

123456789101112131415161718192021222324252627282930313233343536
  1. #include <linux/kernel.h>
  2. #include <linux/init.h>
  3. #include <asm/setup.h>
  4. #include <asm/bios_ebda.h>
  5. void __init x86_early_init_platform_quirks(void)
  6. {
  7. x86_platform.legacy.rtc = 1;
  8. x86_platform.legacy.reserve_bios_regions = 0;
  9. x86_platform.legacy.devices.pnpbios = 1;
  10. switch (boot_params.hdr.hardware_subarch) {
  11. case X86_SUBARCH_PC:
  12. x86_platform.legacy.reserve_bios_regions = 1;
  13. break;
  14. case X86_SUBARCH_XEN:
  15. case X86_SUBARCH_LGUEST:
  16. case X86_SUBARCH_INTEL_MID:
  17. case X86_SUBARCH_CE4100:
  18. x86_platform.legacy.devices.pnpbios = 0;
  19. x86_platform.legacy.rtc = 0;
  20. break;
  21. }
  22. if (x86_platform.set_legacy_features)
  23. x86_platform.set_legacy_features();
  24. }
  25. #if defined(CONFIG_PNPBIOS)
  26. bool __init arch_pnpbios_disabled(void)
  27. {
  28. return x86_platform.legacy.devices.pnpbios == 0;
  29. }
  30. #endif