[SeaBIOS] [PATCH 2/4] Rename find_pmtimer() to find_acpi_features()

David Woodhouse dwmw2 at infradead.org
Sat Feb 23 01:24:48 CET 2013


From: David Woodhouse <David.Woodhouse at intel.com>

I'm about to make it do more than just the pmtimer...

Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
 src/acpi.c     | 10 ++++------
 src/acpi.h     |  2 +-
 src/coreboot.c |  4 ++--
 src/csm.c      |  4 ++--
 src/xen.c      |  4 ++--
 5 files changed, 11 insertions(+), 13 deletions(-)

diff --git a/src/acpi.c b/src/acpi.c
index c7177c3..36bd39a 100644
--- a/src/acpi.c
+++ b/src/acpi.c
@@ -925,15 +925,13 @@ find_resume_vector(void)
 }
 
 void
-find_pmtimer(void)
+find_acpi_features(void)
 {
     struct fadt_descriptor_rev1 *fadt = find_fadt();
     if (!fadt)
         return;
-    u32 pm_tmr = fadt->pm_tmr_blk;
+    u32 pm_tmr = le32_to_cpu(fadt->pm_tmr_blk);
     dprintf(4, "pm_tmr_blk=%x\n", pm_tmr);
-    if (!pm_tmr)
-        return;
-
-    pmtimer_setup(pm_tmr, 3579);
+    if (pm_tmr)
+        pmtimer_setup(pm_tmr, 3579);
 }
diff --git a/src/acpi.h b/src/acpi.h
index e52470e..b23717a 100644
--- a/src/acpi.h
+++ b/src/acpi.h
@@ -5,7 +5,7 @@
 
 void acpi_setup(void);
 u32 find_resume_vector(void);
-void find_pmtimer(void);
+void find_acpi_features(void);
 
 #define RSDP_SIGNATURE 0x2052545020445352LL // "RSD PTR "
 
diff --git a/src/coreboot.c b/src/coreboot.c
index f0484e1..c9ad2a8 100644
--- a/src/coreboot.c
+++ b/src/coreboot.c
@@ -12,7 +12,7 @@
 #include "boot.h" // boot_add_cbfs
 #include "disk.h" // MAXDESCSIZE
 #include "config.h" // CONFIG_*
-#include "acpi.h" // find_pmtimer
+#include "acpi.h" // find_acpi_features
 #include "pci.h" // pci_probe_devices
 
 
@@ -214,7 +214,7 @@ coreboot_platform_setup(void)
             scan_tables(m->start, m->size);
     }
 
-    find_pmtimer();
+    find_acpi_features();
 }
 
 
diff --git a/src/csm.c b/src/csm.c
index 68f8830..4336e16 100644
--- a/src/csm.c
+++ b/src/csm.c
@@ -146,12 +146,12 @@ handle_csm_0002(struct bregs *regs)
         dprintf(3, "CSM PIRQ table at %p\n", PirAddr);
     }
 
-    // For find_resume_vector()... and find_pmtimer()
+    // For find_resume_vector()... and find_acpi_features()
     if (csm_rsdp.signature == RSDP_SIGNATURE) {
         RsdpAddr = &csm_rsdp;
         dprintf(3, "CSM ACPI RSDP at %p\n", RsdpAddr);
 
-        find_pmtimer();
+        find_acpi_features();
     }
 
     // SMBIOS table needs to be copied into the f-seg
diff --git a/src/xen.c b/src/xen.c
index db542c3..5dfee9e 100644
--- a/src/xen.c
+++ b/src/xen.c
@@ -10,7 +10,7 @@
 #include "memmap.h" // add_e820
 #include "types.h" // ASM32FLAT
 #include "util.h" // copy_acpi_rsdp
-#include "acpi.h" // find_pmtimer
+#include "acpi.h" // find_acpi_features
 
 #define INFO_PHYSICAL_ADDRESS 0x00001000
 
@@ -125,7 +125,7 @@ void xen_biostable_setup(void)
     for (i=0; i<info->tables_nr; i++)
         copy_table(tables[i]);
 
-    find_pmtimer();
+    find_acpi_features();
 }
 
 void xen_ramsize_preinit(void)
-- 
1.8.1.2




More information about the SeaBIOS mailing list