From: "Bongini Maurizio" <bong.mau-VGgt2q2+T+FeoWH0uzbU5w@public.gmane.org>
To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: ACPI Activation...
Date: Thu, 22 Apr 2004 16:57:15 +0200 [thread overview]
Message-ID: <002201c4287a$1e0d5d50$84fe1e97@computername> (raw)
[-- Attachment #1: Type: text/plain, Size: 1366 bytes --]
Hello folks
my name is Maurzio Bongini
i need to activate acpi
i read the sourceforge page and the "ACPI how to"
Hardware toshiba satellite 1800-712 last bios installed (2.10)
software :
boot manager Lilo
Default partition Windows XP -home
Second partition linux mandrake 9.2 kernel 2.4.22-10mdk
problem :
reboot process on windows function correctly
(shutdown,then power off,then power on again and reload)
reboot process on linux does not function
shutdown correctly,then don't poweroff like windows ,but try to reboot,
at this time pc hangs with a blank screen and fan at the maximum speed)
i look at windows configuration and i see that battery is ACPI managed
about battery here the info available on windows xp
Battery in ACPI windows compatible.
AC microsoft card.
so i want to activate acpi to make linux functioning at the same way as
microsoft do.
the current ACPI is 20030813
before activating i downloaded the last patch relative to 2.4.22 kernel
and i install it but i get the following errors: (see attached files)
what is the problem ?
i have to install first acpi and acpid before patching ?
i want also to know your opinion about the defect described..
does missing ACPI activation may be the cause ?
thanks in advance for the support
(please answer to bong.mau-VGgt2q2+T+FeoWH0uzbU5w@public.gmane.org )
ciao
Maurizio
[-- Attachment #2: Config.in.rej --]
[-- Type: application/octet-stream, Size: 2757 bytes --]
***************
*** 8,43 ****
comment 'ACPI Support'
bool 'ACPI Support' CONFIG_ACPI
if [ "$CONFIG_ACPI" = "y" ]; then
- if [ "$CONFIG_SMP" = "y" ]; then
- bool 'CPU Enumeration Only' CONFIG_ACPI_HT_ONLY
- else
- define_bool CONFIG_ACPI_HT_ONLY n
- fi
- if [ "$CONFIG_ACPI_HT_ONLY" = "n" ]; then
define_bool CONFIG_ACPI_BOOT y
- define_bool CONFIG_ACPI_BUS y
- define_bool CONFIG_ACPI_INTERPRETER y
- define_bool CONFIG_ACPI_EC y
- define_bool CONFIG_ACPI_POWER y
- if [ "$CONFIG_PCI" = "y" ]; then
- define_bool CONFIG_ACPI_PCI y
- fi
- define_bool CONFIG_ACPI_SLEEP y
- define_bool CONFIG_ACPI_SYSTEM y
- tristate ' AC Adapter' CONFIG_ACPI_AC
- tristate ' Battery' CONFIG_ACPI_BATTERY
- tristate ' Button' CONFIG_ACPI_BUTTON
- tristate ' Fan' CONFIG_ACPI_FAN
- tristate ' Processor' CONFIG_ACPI_PROCESSOR
- dep_tristate ' Thermal Zone' CONFIG_ACPI_THERMAL $CONFIG_ACPI_PROCESSOR
- if [ "$CONFIG_NUMA" = "y" -a "$CONFIG_X86_64" != "y" ]; then
- dep_bool ' NUMA support' CONFIG_ACPI_NUMA $CONFIG_NUMA
- fi
- tristate ' ASUS Laptop Extras' CONFIG_ACPI_ASUS
- tristate ' Toshiba Laptop Extras' CONFIG_ACPI_TOSHIBA
- bool ' Debug Statements' CONFIG_ACPI_DEBUG
- bool ' Relaxed AML Checking' CONFIG_ACPI_RELAXED_AML
fi
fi
--- 8,37 ----
comment 'ACPI Support'
bool 'ACPI Support' CONFIG_ACPI
if [ "$CONFIG_ACPI" = "y" ]; then
+ define_bool CONFIG_ACPI_BOOT y
+ define_bool CONFIG_ACPI_BUS y
+ define_bool CONFIG_ACPI_INTERPRETER y
+ define_bool CONFIG_ACPI_EC y
+ define_bool CONFIG_ACPI_POWER y
+ if [ "$CONFIG_PCI" = "y" ]; then
+ define_bool CONFIG_ACPI_PCI y
+ fi
+ define_bool CONFIG_ACPI_SLEEP y
+ define_bool CONFIG_ACPI_SYSTEM y
+ tristate ' AC Adapter' CONFIG_ACPI_AC
+ tristate ' Battery' CONFIG_ACPI_BATTERY
+ tristate ' Button' CONFIG_ACPI_BUTTON
+ tristate ' Fan' CONFIG_ACPI_FAN
+ tristate ' Processor' CONFIG_ACPI_PROCESSOR
+ dep_tristate ' Thermal Zone' CONFIG_ACPI_THERMAL $CONFIG_ACPI_PROCESSOR
+ tristate ' ASUS Laptop Extras' CONFIG_ACPI_ASUS
+ tristate ' Toshiba Laptop Extras' CONFIG_ACPI_TOSHIBA
+ bool ' Debug Statements' CONFIG_ACPI_DEBUG
+ bool ' Relaxed AML Checking' CONFIG_ACPI_RELAXED_AML
+ else
+ if [ "$CONFIG_SMP" = "y" ]; then
define_bool CONFIG_ACPI_BOOT y
fi
fi
[-- Attachment #3: Configure.help.rej --]
[-- Type: application/octet-stream, Size: 1468 bytes --]
***************
*** 19951,19981 ****
of verbosity. Saying Y enables these statements. This will increase
your kernel size by around 50K.
- ACPI Relaxed AML Checking
- CONFIG_ACPI_RELAXED_AML
- If you say `Y' here, the ACPI interpreter will relax its checking
- for valid AML and will ignore some AML mistakes, such as off-by-one
- errors in region sizes. Some laptops may require this option. In
- particular, many Toshiba laptops require this for correct operation
- of the AC module.
-
- ACPI Bus Manager
- CONFIG_ACPI_BUSMGR
- The ACPI Bus Manager enumerates devices in the ACPI namespace, and
- handles PnP messages. All ACPI devices use its services, so using
- them requires saying Y here.
-
- ACPI System Driver
- CONFIG_ACPI_SYS
- This driver will enable your system to shut down using ACPI, and
- dump your ACPI DSDT table using /proc/acpi/dsdt.
-
- ACPI Processor Driver
- CONFIG_ACPI_CPU
- This driver installs ACPI as the idle handler for Linux, and uses
- ACPI C2 and C3 processor states to save power, on systems that
- support it.
-
ACPI Button
CONFIG_ACPI_BUTTON
This driver registers for events based on buttons, such as the
--- 19929,19934 ----
of verbosity. Saying Y enables these statements. This will increase
your kernel size by around 50K.
ACPI Button
CONFIG_ACPI_BUTTON
This driver registers for events based on buttons, such as the
[-- Attachment #4: io_apic.c.rej --]
[-- Type: application/octet-stream, Size: 1842 bytes --]
***************
*** 1762,1768 ****
}
- int io_apic_set_pci_routing (int ioapic, int pin, int irq)
{
struct IO_APIC_route_entry entry;
unsigned long flags;
--- 1824,1830 ----
}
+ int io_apic_set_pci_routing (int ioapic, int pin, int irq, int edge_level, int active_high_low)
{
struct IO_APIC_route_entry entry;
unsigned long flags;
***************
*** 1785,1802 ****
entry.dest_mode = INT_DELIVERY_MODE;
entry.dest.logical.logical_dest = TARGET_CPUS;
entry.mask = 1; /* Disabled (masked) */
- entry.trigger = 1; /* Level sensitive */
- entry.polarity = 1; /* Low active */
- add_pin_to_irq(irq, ioapic, pin);
entry.vector = assign_irq_vector(irq);
printk(KERN_DEBUG "IOAPIC[%d]: Set PCI routing entry (%d-%d -> 0x%x -> "
- "IRQ %d)\n", ioapic,
- mp_ioapics[ioapic].mpc_apicid, pin, entry.vector, irq);
- irq_desc[irq].handler = &ioapic_level_irq_type;
set_intr_gate(entry.vector, interrupt[irq]);
--- 1847,1871 ----
entry.dest_mode = INT_DELIVERY_MODE;
entry.dest.logical.logical_dest = TARGET_CPUS;
entry.mask = 1; /* Disabled (masked) */
+ entry.trigger = edge_level;
+ entry.polarity = active_high_low;
+ /*
+ * IRQs < 16 are already in the irq_2_pin[] map
+ */
+ if (irq >= 16)
+ add_pin_to_irq(irq, ioapic, pin);
entry.vector = assign_irq_vector(irq);
printk(KERN_DEBUG "IOAPIC[%d]: Set PCI routing entry (%d-%d -> 0x%x -> "
+ "IRQ %d Mode:%i Active:%i)\n", ioapic,
+ mp_ioapics[ioapic].mpc_apicid, pin, entry.vector, irq, edge_level, active_high_low);
+ if (edge_level)
+ irq_desc[irq].handler = &ioapic_level_irq_type;
+ else
+ irq_desc[irq].handler = &ioapic_edge_irq_type;
set_intr_gate(entry.vector, interrupt[irq]);
[-- Attachment #5: io_apic.h.rej --]
[-- Type: application/octet-stream, Size: 1239 bytes --]
***************
*** 141,153 ****
*/
#define io_apic_assign_pci_irqs (mp_irq_entries && !skip_ioapic_setup)
- #else /* !CONFIG_X86_IO_APIC */
#define io_apic_assign_pci_irqs 0
- #endif
extern int io_apic_get_unique_id (int ioapic, int apic_id);
extern int io_apic_get_version (int ioapic);
extern int io_apic_get_redir_entries (int ioapic);
- extern int io_apic_set_pci_routing (int ioapic, int pin, int irq);
#endif
--- 141,170 ----
*/
#define io_apic_assign_pci_irqs (mp_irq_entries && !skip_ioapic_setup)
+ extern int skip_ioapic_setup; /* 1 for "noapic" */
+
+ static inline void disable_ioapic_setup(void)
+ {
+ skip_ioapic_setup = 1;
+ }
+
+ static inline int ioapic_setup_disabled(void)
+ {
+ return skip_ioapic_setup;
+ }
+
+ #else /* !CONFIG_X86_IO_APIC */
+
#define io_apic_assign_pci_irqs 0
+
+ static inline void disable_ioapic_setup(void)
+ { }
+
+ #endif /* !CONFIG_X86_IO_APIC */
extern int io_apic_get_unique_id (int ioapic, int apic_id);
extern int io_apic_get_version (int ioapic);
extern int io_apic_get_redir_entries (int ioapic);
+ extern int io_apic_set_pci_routing (int ioapic, int pin, int irq, int, int);
#endif
[-- Attachment #6: mpparse.c.rej --]
[-- Type: application/octet-stream, Size: 5606 bytes --]
***************
*** 139,147 ****
str[6] = 0;
Dprintk("Bus #%d is %s\n", m->mpc_busid, str);
- if (m->mpc_busid >= MAX_MP_BUSSES) {
printk(KERN_ERR "MAX_MP_BUSSES ERROR mpc_busid %d, max %d\n", m->mpc_busid, MAX_MP_BUSSES);
- } else if (strncmp(str, "ISA", 3) == 0) {
mp_bus_id_to_type[m->mpc_busid] = MP_BUS_ISA;
} else if (strncmp(str, "EISA", 4) == 0) {
mp_bus_id_to_type[m->mpc_busid] = MP_BUS_EISA;
--- 156,167 ----
str[6] = 0;
Dprintk("Bus #%d is %s\n", m->mpc_busid, str);
+ #if MAX_MP_BUSSES < 256
+ if ((long)m->mpc_busid >= MAX_MP_BUSSES) {
printk(KERN_ERR "MAX_MP_BUSSES ERROR mpc_busid %d, max %d\n", m->mpc_busid, MAX_MP_BUSSES);
+ } else
+ #endif
+ if (strncmp(str, "ISA", 3) == 0) {
mp_bus_id_to_type[m->mpc_busid] = MP_BUS_ISA;
} else if (strncmp(str, "EISA", 4) == 0) {
mp_bus_id_to_type[m->mpc_busid] = MP_BUS_EISA;
***************
*** 713,719 ****
return i;
}
- printk(KERN_ERR "ERROR: Unable to locate IOAPIC for IRQ %d/n", irq);
return -1;
}
--- 733,739 ----
return i;
}
+ printk(KERN_ERR "ERROR: Unable to locate IOAPIC for IRQ %d\n", irq);
return -1;
}
***************
*** 756,762 ****
mp_ioapic_routing[idx].irq_end = irq_base +
io_apic_get_redir_entries(idx);
- printk("IOAPIC[%d]: apic_id %d, version %d, address 0x%lx, "
"IRQ %d-%d\n", idx, mp_ioapics[idx].mpc_apicid,
mp_ioapics[idx].mpc_apicver, mp_ioapics[idx].mpc_apicaddr,
mp_ioapic_routing[idx].irq_start,
--- 776,782 ----
mp_ioapic_routing[idx].irq_end = irq_base +
io_apic_get_redir_entries(idx);
+ printk("IOAPIC[%d]: apic_id %d, version %d, address 0x%x, "
"IRQ %d-%d\n", idx, mp_ioapics[idx].mpc_apicid,
mp_ioapics[idx].mpc_apicver, mp_ioapics[idx].mpc_apicaddr,
mp_ioapic_routing[idx].irq_start,
***************
*** 883,933 ****
#ifndef CONFIG_ACPI_HT_ONLY
- /* Ensure the ACPI SCI interrupt level is active low, edge-triggered */
-
extern FADT_DESCRIPTOR acpi_fadt;
- void __init mp_config_ioapic_for_sci(int irq)
- {
- int ioapic;
- int ioapic_pin;
- struct acpi_table_madt* madt;
- struct acpi_table_int_src_ovr *entry = NULL;
- void *madt_end;
- acpi_status status;
-
- /*
- * Ensure that if there is an interrupt source override entry
- * for the ACPI SCI, we leave it as is. Unfortunately this involves
- * walking the MADT again.
- */
- status = acpi_get_firmware_table("APIC", 1, ACPI_LOGICAL_ADDRESSING,
- (struct acpi_table_header **) &madt);
- if (ACPI_SUCCESS(status)) {
- madt_end = (void *) (unsigned long)madt + madt->header.length;
-
- entry = (struct acpi_table_int_src_ovr *)
- ((unsigned long) madt + sizeof(struct acpi_table_madt));
-
- while ((void *) entry < madt_end) {
- if (entry->header.type == ACPI_MADT_INT_SRC_OVR &&
- acpi_fadt.sci_int == entry->global_irq)
- return;
-
- entry = (struct acpi_table_int_src_ovr *)
- ((unsigned long) entry + entry->header.length);
- }
- }
-
- ioapic = mp_find_ioapic(irq);
-
- ioapic_pin = irq - mp_ioapic_routing[ioapic].irq_start;
-
- io_apic_set_pci_routing(ioapic, ioapic_pin, irq);
- }
-
#endif /*CONFIG_ACPI_HT_ONLY*/
#ifdef CONFIG_ACPI_PCI
void __init mp_parse_prt (void)
--- 904,915 ----
#ifndef CONFIG_ACPI_HT_ONLY
extern FADT_DESCRIPTOR acpi_fadt;
#endif /*CONFIG_ACPI_HT_ONLY*/
+ int acpi_tolerant;
+
#ifdef CONFIG_ACPI_PCI
void __init mp_parse_prt (void)
***************
*** 939,944 ****
int ioapic_pin = 0;
int irq = 0;
int idx, bit = 0;
/*
* Parsing through the PCI Interrupt Routing Table (PRT) and program
--- 921,928 ----
int ioapic_pin = 0;
int irq = 0;
int idx, bit = 0;
+ int edge_level = 0;
+ int active_high_low = 0;
/*
* Parsing through the PCI Interrupt Routing Table (PRT) and program
***************
*** 949,961 ****
/* Need to get irq for dynamic entry */
if (entry->link.handle) {
- irq = acpi_pci_link_get_irq(entry->link.handle, entry->link.index);
if (!irq)
continue;
- } else
irq = entry->link.index;
irq = entry->link.index;
ioapic = mp_find_ioapic(irq);
if (ioapic < 0)
continue;
--- 933,955 ----
/* Need to get irq for dynamic entry */
if (entry->link.handle) {
+ irq = acpi_pci_link_get_irq(entry->link.handle, entry->link.index, &edge_level, &active_high_low);
if (!irq)
continue;
+ } else {
+ edge_level = 1;
+ active_high_low = 1;
irq = entry->link.index;
+ }
irq = entry->link.index;
+
+ /* Don't set up the ACPI SCI because it's already set up */
+ if (acpi_fadt.sci_int == irq) {
+ entry->irq = irq; /*we still need to set entry's irq*/
+ continue;
+ }
+
ioapic = mp_find_ioapic(irq);
if (ioapic < 0)
continue;
***************
*** 983,989 ****
mp_ioapic_routing[ioapic].pin_programmed[idx] |= (1<<bit);
- vector = io_apic_set_pci_routing(ioapic, ioapic_pin, irq);
if (vector)
entry->irq = irq;
--- 977,983 ----
mp_ioapic_routing[ioapic].pin_programmed[idx] |= (1<<bit);
+ vector = io_apic_set_pci_routing(ioapic, ioapic_pin, irq, edge_level, active_high_low);
if (vector)
entry->irq = irq;
[-- Attachment #7: pci_link.c.rej --]
[-- Type: application/octet-stream, Size: 3775 bytes --]
***************
*** 290,296 ****
struct acpi_buffer buffer = {sizeof(resource)+1, &resource};
int i = 0;
int valid = 0;
-
ACPI_FUNCTION_TRACE("acpi_pci_link_set");
if (!link || !irq)
--- 314,321 ----
struct acpi_buffer buffer = {sizeof(resource)+1, &resource};
int i = 0;
int valid = 0;
+ int resource_type = 0;
+
ACPI_FUNCTION_TRACE("acpi_pci_link_set");
if (!link || !irq)
***************
*** 313,324 ****
}
}
memset(&resource, 0, sizeof(resource));
/* NOTE: PCI interrupts are always level / active_low / shared. But not all
interrupts > 15 are PCI interrupts. Rely on the ACPI IRQ definition for
parameters */
- if (irq <= 15) {
resource.res.id = ACPI_RSTYPE_IRQ;
resource.res.length = sizeof(struct acpi_resource);
resource.res.data.irq.edge_level = link->irq.edge_level;
--- 338,360 ----
}
}
+ /* If IRQ<=15, first try with a "normal" IRQ descriptor. If that fails, try with
+ * an extended one */
+ if (irq <= 15) {
+ resource_type = ACPI_RSTYPE_IRQ;
+ } else {
+ resource_type = ACPI_RSTYPE_EXT_IRQ;
+ }
+
+ retry_programming:
+
memset(&resource, 0, sizeof(resource));
/* NOTE: PCI interrupts are always level / active_low / shared. But not all
interrupts > 15 are PCI interrupts. Rely on the ACPI IRQ definition for
parameters */
+ switch(resource_type) {
+ case ACPI_RSTYPE_IRQ:
resource.res.id = ACPI_RSTYPE_IRQ;
resource.res.length = sizeof(struct acpi_resource);
resource.res.data.irq.edge_level = link->irq.edge_level;
***************
*** 326,333 ****
resource.res.data.irq.shared_exclusive = ACPI_SHARED;
resource.res.data.irq.number_of_interrupts = 1;
resource.res.data.irq.interrupts[0] = irq;
- }
- else {
resource.res.id = ACPI_RSTYPE_EXT_IRQ;
resource.res.length = sizeof(struct acpi_resource);
resource.res.data.extended_irq.producer_consumer = ACPI_CONSUMER;
--- 362,370 ----
resource.res.data.irq.shared_exclusive = ACPI_SHARED;
resource.res.data.irq.number_of_interrupts = 1;
resource.res.data.irq.interrupts[0] = irq;
+ break;
+
+ case ACPI_RSTYPE_EXT_IRQ:
resource.res.id = ACPI_RSTYPE_EXT_IRQ;
resource.res.length = sizeof(struct acpi_resource);
resource.res.data.extended_irq.producer_consumer = ACPI_CONSUMER;
***************
*** 337,347 ****
resource.res.data.extended_irq.number_of_interrupts = 1;
resource.res.data.extended_irq.interrupts[0] = irq;
/* ignore resource_source, it's optional */
}
resource.end.id = ACPI_RSTYPE_END_TAG;
/* Attempt to set the resource */
status = acpi_set_current_resources(link->handle, &buffer);
if (ACPI_FAILURE(status)) {
ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error evaluating _SRS\n"));
return_VALUE(-ENODEV);
--- 374,395 ----
resource.res.data.extended_irq.number_of_interrupts = 1;
resource.res.data.extended_irq.interrupts[0] = irq;
/* ignore resource_source, it's optional */
+ break;
}
resource.end.id = ACPI_RSTYPE_END_TAG;
/* Attempt to set the resource */
status = acpi_set_current_resources(link->handle, &buffer);
+
+
+ /* if we failed and IRQ <= 15, try again with an extended descriptor */
+ if (ACPI_FAILURE(status) && (resource_type == ACPI_RSTYPE_IRQ)) {
+ resource_type = ACPI_RSTYPE_EXT_IRQ;
+ printk(PREFIX "Retrying with extended IRQ descriptor\n");
+ goto retry_programming;
+ }
+
+ /* check for total failure */
if (ACPI_FAILURE(status)) {
ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error evaluating _SRS\n"));
return_VALUE(-ENODEV);
[-- Attachment #8: smpboot.c.rej --]
[-- Type: application/octet-stream, Size: 787 bytes --]
***************
*** 51,57 ****
static int smp_b_stepping;
/* Setup configured maximum number of CPUs to activate */
- static int max_cpus = -1;
/* Total count of live CPUs */
int smp_num_cpus = 1;
--- 51,57 ----
static int smp_b_stepping;
/* Setup configured maximum number of CPUs to activate */
+ unsigned int max_cpus = NR_CPUS;
/* Total count of live CPUs */
int smp_num_cpus = 1;
***************
*** 1123,1130 ****
continue;
if (!(phys_cpu_present_map & (1ul << bit)))
- continue;
- if ((max_cpus >= 0) && (max_cpus <= cpucount+1))
continue;
do_boot_cpu(apicid);
--- 1111,1116 ----
continue;
if (!(phys_cpu_present_map & (1ul << bit)))
continue;
do_boot_cpu(apicid);
reply other threads:[~2004-04-22 14:57 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='002201c4287a$1e0d5d50$84fe1e97@computername' \
--to=bong.mau-vggt2q2+t+feowh0uzbu5w@public.gmane.org \
--cc=acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox