usb: enable 64bit support for x86

Fix #436
This commit is contained in:
Alexander Boettcher 2013-02-27 12:05:44 +01:00 committed by Norman Feske
parent dc814ff0f1
commit 8bc14eb75a
5 changed files with 51 additions and 8 deletions

View File

@ -3,10 +3,5 @@ SRC_C += $(addprefix usb/host/,pci-quirks.c uhci-hcd.c)
include $(REP_DIR)/lib/mk/usb.inc
CC_OPT += -DCONFIG_PCI
INC_DIR += $(LIB_INC_DIR)/x86
INC_DIR += $(LIB_INC_DIR)/x86_32 $(LIB_INC_DIR)/x86
SRC_CC += pci_driver.cc

View File

@ -0,0 +1,7 @@
SRC_C += $(addprefix usb/host/,pci-quirks.c uhci-hcd.c)
include $(REP_DIR)/lib/mk/usb.inc
CC_OPT += -DCONFIG_PCI
INC_DIR += $(LIB_INC_DIR)/x86_64 $(LIB_INC_DIR)/x86
SRC_CC += pci_driver.cc

View File

@ -0,0 +1,41 @@
/**
* \brief Platform specific code
* \author Sebastian Sumpf
* \author Alexander Boettcher
* \date 2012-06-10
*/
/*
* Copyright (C) 2012-2013 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU General Public License version 2.
*/
#ifndef _X86_64__PLATFORM_H_
#define _X86_64__PLATFORM_H_
#include <platform.h>
static inline
void platform_execute(void *sp, void *func, void *arg)
{
asm volatile ("movq %2, %%rdi;"
"movq %1, 0(%0);"
"movq %0, %%rsp;"
"call *0(%%rsp);"
: "+r" (sp), "+r" (func), "+r" (arg) : : "memory");
}
extern "C" void module_ehci_hcd_init();
extern "C" void module_uhci_hcd_init();
inline void platform_hcd_init(Services *s)
{
/* ehci_hcd should always be loaded before uhci_hcd and ohci_hcd, not after */
module_ehci_hcd_init();
module_uhci_hcd_init();
}
#endif /* _X86_64__PLATFORM_H_ */

View File

@ -572,7 +572,7 @@ struct kmem_cache
struct kmem_cache *kmem_cache_create(const char *name, size_t size, size_t align,
unsigned long falgs, void (*ctor)(void *))
{
dde_kit_log(DEBUG_SLAB, "\"%s\" obj_size=%d", name, size);
dde_kit_log(DEBUG_SLAB, "\"%s\" obj_size=%zd", name, size);
struct kmem_cache *cache;
@ -643,7 +643,7 @@ void *_ioremap(resource_size_t phys_addr, unsigned long size, int wc)
{
dde_kit_addr_t map_addr;
if (dde_kit_request_mem(phys_addr, size, wc, &map_addr)) {
PERR("Failed to request I/O memory: [%x,%lx)", phys_addr, phys_addr + size);
PERR("Failed to request I/O memory: [%zx,%lx)", phys_addr, phys_addr + size);
return 0;
}