diff options
author | Eric Biederman <ebiederm@xmission.com> | 2003-06-10 21:22:07 +0000 |
---|---|---|
committer | Eric Biederman <ebiederm@xmission.com> | 2003-06-10 21:22:07 +0000 |
commit | 6aa31cc754744a83177ea922e71c6bdf02cad5df (patch) | |
tree | 00fc8a3cc81f367240eb5ac5a627841d1bb0a1a0 /util/romcc/tests/simple_test28.c | |
parent | dc18ef018d080f050de9e28be913f544d3009cb2 (diff) |
- Update romcc to version 0.27 and add more tests.
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@865 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'util/romcc/tests/simple_test28.c')
-rw-r--r-- | util/romcc/tests/simple_test28.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/util/romcc/tests/simple_test28.c b/util/romcc/tests/simple_test28.c new file mode 100644 index 0000000000..8d83383124 --- /dev/null +++ b/util/romcc/tests/simple_test28.c @@ -0,0 +1,24 @@ +static void outl(unsigned int value, unsigned short port) +{ + __builtin_outl(value, port); +} + +static unsigned char inl(unsigned short port) +{ + return __builtin_inl(port); +} + + +static void setup_coherent_ht_domain(void) +{ + static const unsigned int register_values[] = { + ( (((0) & 0xFF) << 16) | (((0x18) & 0x1f) << 11) | (((0) & 0x07) << 8) | ((0x40) & 0xFF)), 0xfff0f0f0, 0x00010101, + + }; + unsigned long reg; + reg = inl(0xFC); + reg &= register_values[1]; + reg |= register_values[2] & ~register_values[1]; + outl(register_values[0], 0xF8); + outl(reg, 0xFC); +} |