diff options
author | Tiago Vignatti <tiago.vignatti@nokia.com> | 2009-12-23 20:05:36 +0200 |
---|---|---|
committer | Tiago Vignatti <tiago.vignatti@nokia.com> | 2009-12-23 20:05:36 +0200 |
commit | 36edcf280080e53efee30bbaca07767350674c16 (patch) | |
tree | 19c7387b123da948a944da6fc1029119fc7c2906 | |
parent | a6d57635fb02ee0bd968fd8ac094a7821ada6a8f (diff) |
lrmi: merge setup with init routine
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
-rw-r--r-- | include/libx86.h | 5 | ||||
-rw-r--r-- | src/lrmi/backend-x86emu.c | 25 |
2 files changed, 12 insertions, 18 deletions
diff --git a/include/libx86.h b/include/libx86.h index c9ff58c..d7b61c9 100644 --- a/include/libx86.h +++ b/include/libx86.h @@ -76,13 +76,10 @@ typedef struct _int10Mem { void(*wl)(xf86Int10InfoPtr, int, unsigned long); } int10MemRec, *int10MemPtr; -/* Initialize returns 1 if sucessful, 0 for failure */ -int LRMI_init(void); +void LRMI_init(xf86Int10InfoPtr pInt); void LRMI_fini(xf86Int10InfoPtr pInt); -void LRMI_setup(xf86Int10InfoPtr pInt); - /* Get the base address of the real memory address space block. */ void *LRMI_base_addr(xf86Int10InfoPtr pInt, unsigned long addr); diff --git a/src/lrmi/backend-x86emu.c b/src/lrmi/backend-x86emu.c index 2e21168..2328ccc 100644 --- a/src/lrmi/backend-x86emu.c +++ b/src/lrmi/backend-x86emu.c @@ -408,7 +408,7 @@ LRMI_int(xf86Int10InfoPtr pInt) } void -LRMI_setup(xf86Int10InfoPtr pInt) +LRMI_init(xf86Int10InfoPtr pInt) { int i; X86EMU_intrFuncs intFuncs[256]; @@ -441,19 +441,7 @@ LRMI_setup(xf86Int10InfoPtr pInt) X86EMU_setupIntrFuncs(intFuncs); pInt->mem = &genericMem; -} - -void -LRMI_set_exit_condition(xf86Int10InfoPtr pInt) -{ - /* - * Here we set the exit condition: We return when we encounter - * 'hlt' (=0xf4), which we locate at address 0x600 in x86 memory. - */ - MEM_WB(pInt, 0x0600, 0xf4); -} -int LRMI_init() { #if 0 int i; @@ -474,7 +462,16 @@ int LRMI_init() { *((char *)0) = 0xf4; /* Make sure that we end up jumping back to a halt instruction */ #endif - return 1; +} + +void +LRMI_set_exit_condition(xf86Int10InfoPtr pInt) +{ + /* + * Here we set the exit condition: We return when we encounter + * 'hlt' (=0xf4), which we locate at address 0x600 in x86 memory. + */ + MEM_WB(pInt, 0x0600, 0xf4); } void |