summaryrefslogtreecommitdiff
path: root/util/romcc/tests/simple_test31.c
diff options
context:
space:
mode:
authorEric Biederman <ebiederm@xmission.com>2003-06-11 21:55:00 +0000
committerEric Biederman <ebiederm@xmission.com>2003-06-11 21:55:00 +0000
commit05f26fcb571340b17beaca16939a025a9c0b4cdd (patch)
treea8c830fedbd545bf11c72c6d20b9e0715ffb6fdf /util/romcc/tests/simple_test31.c
parentc927b022c23a55e84d5d6aaac1deb7b95e25a878 (diff)
downloadcoreboot-05f26fcb571340b17beaca16939a025a9c0b4cdd.tar.xz
- Factoring of auto.c
- Implementation of fallback/normal support for the amd solo board - Minor bugfix in romcc git-svn-id: svn://svn.coreboot.org/coreboot/trunk@867 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'util/romcc/tests/simple_test31.c')
-rw-r--r--util/romcc/tests/simple_test31.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/util/romcc/tests/simple_test31.c b/util/romcc/tests/simple_test31.c
new file mode 100644
index 0000000000..4ce77d3f6d
--- /dev/null
+++ b/util/romcc/tests/simple_test31.c
@@ -0,0 +1,16 @@
+
+static unsigned pci_locate_device(unsigned addr)
+{
+ addr &= ~0xff;
+ for(; addr <= 0x00ffff00; addr += 0x00000100) {
+ __builtin_outl(addr, 0x12);
+ }
+ return addr;
+}
+
+static void main(void)
+{
+ unsigned long addr;
+ addr = pci_locate_device(0);
+ __builtin_outl(addr, 0x12);
+}