Date: Thu, 23 Jul 2015 17:55:44 GMT From: mihai@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r288698 - in soc2015/mihai/bhyve-on-arm-head/sys: conf dev/bvm Message-ID: <201507231755.t6NHtiGU036242@socsvn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mihai Date: Thu Jul 23 17:55:43 2015 New Revision: 288698 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=288698 Log: soc2015: mihai: bhyve: sys: dev: bvm: bvm_console.c: modify paravit console to use MMIO for ARM instead of port Modified: soc2015/mihai/bhyve-on-arm-head/sys/conf/files.arm soc2015/mihai/bhyve-on-arm-head/sys/dev/bvm/bvm_console.c Modified: soc2015/mihai/bhyve-on-arm-head/sys/conf/files.arm ============================================================================== --- soc2015/mihai/bhyve-on-arm-head/sys/conf/files.arm Thu Jul 23 17:54:41 2015 (r288697) +++ soc2015/mihai/bhyve-on-arm-head/sys/conf/files.arm Thu Jul 23 17:55:43 2015 (r288698) @@ -122,3 +122,7 @@ libkern/ucmpdi2.c standard libkern/udivdi3.c standard libkern/umoddi3.c standard +# +# bvm console +# +dev/bvm/bvm_console.c optional bvmconsole Modified: soc2015/mihai/bhyve-on-arm-head/sys/dev/bvm/bvm_console.c ============================================================================== --- soc2015/mihai/bhyve-on-arm-head/sys/dev/bvm/bvm_console.c Thu Jul 23 17:54:41 2015 (r288697) +++ soc2015/mihai/bhyve-on-arm-head/sys/dev/bvm/bvm_console.c Thu Jul 23 17:55:43 2015 (r288698) @@ -64,9 +64,13 @@ static int alt_break_state; #endif +#if defined(__i386__) || defined(__amd64__) #define BVM_CONS_PORT 0x220 -static int bvm_cons_port = BVM_CONS_PORT; +#elif defined(__arm__) +#define BVM_CONS_PORT 0x220 +#endif +static int bvm_cons_port = BVM_CONS_PORT; #define BVM_CONS_SIG ('b' << 8 | 'v') static void bvm_timeout(void *); @@ -85,8 +89,11 @@ bvm_rcons(u_char *ch) { int c; - +#if defined(__i386__) || defined(__amd64__) c = inl(bvm_cons_port); +#elif defined(__arm__) + c = (*(int *)bvm_cons_port); +#endif if (c != -1) { *ch = (u_char)c; return (0); @@ -97,10 +104,19 @@ static void bvm_wcons(u_char ch) { - +#if defined(__i386__) || defined(__amd64__) outl(bvm_cons_port, ch); +#elif defined(__arm__) + (*(int *)bvm_cons_port) = ch; +#endif } +#if defined(__arm__) +#ifdef EARLY_PRINTF +early_putc_t * early_putc = (early_putc_t *) bvm_wcons; +#endif +#endif + static void cn_drvinit(void *unused) { @@ -178,8 +194,11 @@ if (!disabled) { if (resource_int_value("bvmconsole", 0, "port", &port) == 0) bvm_cons_port = port; - +#if defined(__i386__) || defined(__amd64__) if (inw(bvm_cons_port) == BVM_CONS_SIG) +#elif defined(__arm__) + if ((*(short *)bvm_cons_port) == BVM_CONS_SIG) +#endif cp->cn_pri = CN_REMOTE; } }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201507231755.t6NHtiGU036242>