summaryrefslogtreecommitdiff
path: root/src/mainboard/technexion/tim8690/acpi/globutil.asl
diff options
context:
space:
mode:
authorUwe Hermann <uwe@hermann-uwe.de>2010-12-09 12:39:48 +0000
committerUwe Hermann <uwe@hermann-uwe.de>2010-12-09 12:39:48 +0000
commitf8ba64d7b75794556132ffdcaf926bc328712937 (patch)
treeb11e2618b18a65b436dbe5f26a19658011773f67 /src/mainboard/technexion/tim8690/acpi/globutil.asl
parent4a778db86edfb65fe74ba2a2596efe3347780b8c (diff)
downloadcoreboot-f8ba64d7b75794556132ffdcaf926bc328712937.tar.xz
Deduplicate various ACPI .asl files.
The files debug.asl, globutil.asl, and statdef.asl are duplicated in many K8/Fam10h boards. However, they're neither board-specific nor K8/Fam10h-specific nor AMD-specific, so move them to src/arch/i386/acpi. debug.asl contains generic chunks for I/O port 0x80 handling, and debug output over serial port (init COM port, send byte, send string, etc). globutil.asl contains utility methods for string comparison, string length and similar stuff. statdef.asl contains generic ACPI bit definitions / status codes from the ACPI spec (not board- or chipset-specific). This patch was mostly generated by: mkdir src/arch/i386/acpi svn add src/arch/i386/acpi svn cp src/mainboard/amd/dbm690t/acpi/debug.asl src/arch/i386/acpi/ svn cp src/mainboard/amd/dbm690t/acpi/globutil.asl src/arch/i386/acpi/ svn cp src/mainboard/amd/dbm690t/acpi/statdef.asl src/arch/i386/acpi/ cd src/mainboard find . -name debug.asl -exec svn rm {} \; find . -name globutil.asl -exec svn rm {} \; find . -name statdef.asl -exec svn rm {} \; Abuild-tested. Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Stefan Reinauer <stepan@coreboot.org> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@6156 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/mainboard/technexion/tim8690/acpi/globutil.asl')
-rw-r--r--src/mainboard/technexion/tim8690/acpi/globutil.asl118
1 files changed, 0 insertions, 118 deletions
diff --git a/src/mainboard/technexion/tim8690/acpi/globutil.asl b/src/mainboard/technexion/tim8690/acpi/globutil.asl
deleted file mode 100644
index 7e7f4e1e16..0000000000
--- a/src/mainboard/technexion/tim8690/acpi/globutil.asl
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright (C) 2008 Advanced Micro Devices, Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-/*
-Scope(\_SB) {
- #include "globutil.asl"
-}
-*/
-
-/* string compare functions */
-Method(MIN, 2)
-{
- if (LLess(Arg0, Arg1)) {
- Return(Arg0)
- } else {
- Return(Arg1)
- }
-}
-
-Method(SLEN, 1)
-{
- Store(Arg0, Local0)
- Return(Sizeof(Local0))
-}
-
-Method(S2BF, 1)
-{
- Add(SLEN(Arg0), One, Local0)
- Name(BUFF, Buffer(Local0) {})
- Store(Arg0, BUFF)
- Return(BUFF)
-}
-
-/* Strong string compare. Checks both length and content */
-Method(SCMP, 2)
-{
- Store(S2BF(Arg0), Local0)
- Store(S2BF(Arg1), Local1)
- Store(Zero, Local4)
- Store(SLEN(Arg0), Local5)
- Store(SLEN(Arg1), Local6)
- Store(MIN(Local5, Local6), Local7)
-
- While(LLess(Local4, Local7)) {
- Store(Derefof(Index(Local0, Local4)), Local2)
- Store(Derefof(Index(Local1, Local4)), Local3)
- if (LGreater(Local2, Local3)) {
- Return(One)
- } else {
- if (LLess(Local2, Local3)) {
- Return(Ones)
- }
- }
- Increment(Local4)
- }
- if (LLess(Local4, Local5)) {
- Return(One)
- } else {
- if (LLess(Local4, Local6)) {
- Return(Ones)
- } else {
- Return(Zero)
- }
- }
-}
-
-/* Weak string compare. Checks to find Arg1 at beginning of Arg0.
-* Fails if length(Arg0) < length(Arg1). Returns 0 on Fail, 1 on
-* Pass.
-*/
-Method(WCMP, 2)
-{
- Store(S2BF(Arg0), Local0)
- Store(S2BF(Arg1), Local1)
- if (LLess(SLEN(Arg0), SLEN(Arg1))) {
- Return(0)
- }
- Store(Zero, Local2)
- Store(SLEN(Arg1), Local3)
-
- While(LLess(Local2, Local3)) {
- if (LNotEqual(Derefof(Index(Local0, Local2)),
- Derefof(Index(Local1, Local2)))) {
- Return(0)
- }
- Increment(Local2)
- }
- Return(One)
-}
-
-/* ARG0 = IRQ Number(0-15)
-* Returns Bit Map
-*/
-Method(I2BM, 1)
-{
- Store(0, Local0)
- if (LNotEqual(ARG0, 0)) {
- Store(1, Local1)
- ShiftLeft(Local1, ARG0, Local0)
- }
- Return(Local0)
-}