1
/******************************************************************************
2
* Copyright (c) 2004, 2011 IBM Corporation
4
* This program and the accompanying materials
5
* are made available under the terms of the BSD License
6
* which accompanies this distribution, and is available at
7
* http://www.opensource.org/licenses/bsd-license.php
10
* IBM Corporation - initial implementation
11
*****************************************************************************/
16
#include <libbootmsg.h>
18
#ifdef SNK_BIOSEMU_APPS
19
#include "biosemu/biosemu.h"
20
#include "biosemu/vbe.h"
23
extern void _callback_entry(void);
24
int callback(int argc, char *argv[]);
28
main(int argc, char *argv[])
31
of_set_callback((void *) &_callback_entry);
33
#ifdef SNK_BIOSEMU_APPS
34
// BIOS Emulator applications
35
if (strcmp(argv[0], "biosemu") == 0)
36
return biosemu(argc, argv);
37
if (strcmp(argv[0], "get_vbe_info") == 0)
38
return vbe_get_info(argc, argv);
41
printf("Unknown client application called\n");
42
for (i = 0; i < argc; i++)
43
printf("argv[%d] %s\n", i, argv[i]);
49
callback(int argc, char *argv[])
56
* Register your application's callback handler here, similar to
57
* the way you would register an application.
58
* Please note that callback functions can be called safely only after
59
* your application has called of_yield(). If you return or exit() from
60
* your client application, the callback can no longer be used.
63
if (strcmp(argv[0], "example") == 0)
64
return example(argc, argv);
67
printf("No such callback function\n");
68
for (i = 0; i < argc; i++)
69
printf("argv[%d] %s\n", i, argv[i]);