summaryrefslogtreecommitdiff
path: root/util/romcc/tests/simple_test74.c
diff options
context:
space:
mode:
authorArthur Heymans <arthur@aheymans.xyz>2019-11-28 16:14:56 +0100
committerPatrick Georgi <pgeorgi@google.com>2019-12-27 09:00:16 +0000
commit945b698f82279fdb42f83f6a3eb2e6f74db2869c (patch)
tree3eac3bd7ec5032441081d89a370acddf8f3e5f5b /util/romcc/tests/simple_test74.c
parentc2092569d5d21e0cdd3690d8021c2d46dfeaeabd (diff)
util/romcc: Drop romcc support
Finally all boards use a GCC compiled bootblock! Change-Id: I0c9a1b19dbdc32b43875da7d685718bae9d7f5f4 Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/37337 Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr> Reviewed-by: Jacob Garber <jgarber1@ualberta.ca> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'util/romcc/tests/simple_test74.c')
-rw-r--r--util/romcc/tests/simple_test74.c88
1 files changed, 0 insertions, 88 deletions
diff --git a/util/romcc/tests/simple_test74.c b/util/romcc/tests/simple_test74.c
deleted file mode 100644
index fff1a16e3f..0000000000
--- a/util/romcc/tests/simple_test74.c
+++ /dev/null
@@ -1,88 +0,0 @@
-struct syscall_result {
- long val;
- int errno;
-};
-
-static struct syscall_result syscall_return(long result)
-{
- struct syscall_result res;
- if (((unsigned long)result) >= ((unsigned long)-125)) {
- res.errno = - result;
- res.val = -1;
- } else {
- res.errno = 0;
- res.val = result;
- }
- return res;
-}
-
-static struct syscall_result syscall1(unsigned long nr, unsigned long arg1)
-{
- long res;
- asm volatile(
- "int $0x80"
- : "=a" (res)
- : "a" (nr), "b" (arg1));
- return syscall_return(res);
-
-}
-
-
-static struct syscall_result syscall3(unsigned long nr, unsigned long arg1, unsigned long arg2,
- unsigned long arg3)
-{
- long res;
- asm volatile(
- "int $0x80"
- : "=a" (res)
- : "a" (nr), "b" (arg1), "c" (arg2), "d" (arg3));
- return syscall_return(res);
-
-}
-
-#define NR_exit 1
-#define NR_write 4
-
-/* Standard file descriptors */
-#define STDIN_FILENO 0 /* Standard input */
-#define STDOUT_FILENO 1 /* Standard output */
-#define STDERR_FILENO 2 /* Standard error output */
-
-typedef long ssize_t;
-typedef unsigned long size_t;
-
-static ssize_t write(int fd, const void *buf, size_t count)
-{
- struct syscall_result res;
- res = syscall3(NR_write, fd, (unsigned long)buf, count);
- return res.val;
-}
-
-static void _exit(int status)
-{
- struct syscall_result res;
- res = syscall1(NR_exit, status);
-}
-
-static void console_tx_string(const char *str)
-{
- unsigned char ch;
- while(1) {
-
- }
- for(;1;) {
- }
- do {
- } while(1);
- if (1) {
- }else {
- }
-}
-
-
-static void main(void)
-{
- static const char msg[] = "hello world\r\n";
- write(STDOUT_FILENO, msg, sizeof(msg));
- _exit(0);
-}