added a boot menu option "Disable ACPI" and code to avoid loading the ACPI module when it's active. untested (because of sudden reboots when boot menu is used).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19777 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
|
||||
#define B_SAFEMODE_DISABLE_USER_ADD_ONS "disableuseraddons"
|
||||
#define B_SAFEMODE_DISABLE_IDE_DMA "disableidedma"
|
||||
#define B_SAFEMODE_DISABLE_ACPI "disableacpi"
|
||||
#define B_SAFEMODE_DISABLE_SMP "disable_smp"
|
||||
#define B_SAFEMODE_DISABLE_HYPER_THREADING "disable_hyperthreading"
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ SubDir HAIKU_TOP src add-ons kernel bus_managers acpi ;
|
||||
|
||||
SetSubDirSupportedPlatformsBeOSCompatible ;
|
||||
|
||||
UsePrivateHeaders kernel ;
|
||||
SubDirHdrs [ FDirName $(SUBDIR) include ] ;
|
||||
SubDirHdrs [ FDirName $(SUBDIR) include platform ] ;
|
||||
SubDirHdrs [ FDirName $(SUBDIR) $(DOTDOT) pci ] ;
|
||||
|
||||
@@ -8,8 +8,9 @@
|
||||
#include <ACPI.h>
|
||||
#include <KernelExport.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <malloc.h>
|
||||
#include <safemode.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "acpi.h"
|
||||
@@ -57,6 +58,8 @@ status_t
|
||||
acpi_std_ops(int32 op,...)
|
||||
{
|
||||
ACPI_STATUS Status;
|
||||
bool acpiDisabled = false;
|
||||
void *settings;
|
||||
|
||||
switch(op) {
|
||||
case B_MODULE_INIT:
|
||||
@@ -65,6 +68,19 @@ acpi_std_ops(int32 op,...)
|
||||
AcpiDbgLevel = ACPI_DEBUG_ALL | ACPI_LV_VERBOSE;
|
||||
AcpiDbgLayer = ACPI_ALL_COMPONENTS;
|
||||
#endif
|
||||
|
||||
// check if safemode settings disable ACPI
|
||||
settings = load_driver_settings(B_SAFEMODE_DRIVER_SETTINGS);
|
||||
if (settings != NULL) {
|
||||
acpiDisabled = get_driver_boolean_parameter(settings, B_SAFEMODE_DISABLE_ACPI,
|
||||
false, false);
|
||||
unload_driver_settings(settings);
|
||||
}
|
||||
|
||||
if (acpiDisabled) {
|
||||
ERROR("ACPI disabled");
|
||||
return ENOSYS;
|
||||
}
|
||||
|
||||
Status = AcpiInitializeSubsystem();
|
||||
if (Status != AE_OK) {
|
||||
|
||||
@@ -443,7 +443,11 @@ add_safe_mode_menu()
|
||||
safeMenu->AddItem(item = new(nothrow) MenuItem("Disable IDE DMA"));
|
||||
item->SetData(B_SAFEMODE_DISABLE_IDE_DMA);
|
||||
item->SetType(MENU_ITEM_MARKABLE);
|
||||
|
||||
|
||||
safeMenu->AddItem(item = new(nothrow) MenuItem("Disable ACPI"));
|
||||
item->SetData(B_SAFEMODE_DISABLE_ACPI);
|
||||
item->SetType(MENU_ITEM_MARKABLE);
|
||||
|
||||
platform_add_menus(safeMenu);
|
||||
|
||||
safeMenu->AddItem(item = new(nothrow) MenuItem("Enable on screen debug output"));
|
||||
|
||||
Reference in New Issue
Block a user