niedziela, 6 maja 2018

Visual Studio Express 2017 install problems

Visual Studio Express is still interesting as its license is has no "Organizational License" clause (https://www.visualstudio.com/license-terms/mlt080317/ vs https://www.visualstudio.com/license-terms/mlt553321/).
Unfortunately installation (at least for me - Win10 Enterprise) was huge pain.
Here are installation hints:

  1. Download and start installer - perhaps you will see error message: "At most one command parameter can be specified..."
  2. If this is the case then copy extracted installer from temporary folder (use TaskManager to find location) - in my case it was folder with name "vs_bootstrapper_d15"
  3. Start installer (using command line) from copied location - in that case I observed no "At most..." error, but after installation start another error had appeared - unable to download "sqlsysclrtypes"
  4. Solution to "sqlsysclrtypes" problem is to download the whole installer locally (using "vs_setup_bootstrapper.exe --layout C:\vs2017offline --lang en-US") and then start "sqlsysclrtypes.msi" manually.
  5. After system restart (required after "sqlsysclrtypes.msi" installation) VSExpress2017 installation was successful.

wtorek, 1 maja 2018

Jacinto J6Eco (DRA72x) hypervisor startup

Normal way to start hypervisor for ARM (e.g. to start XEN) is to start non-secure mode via enter into monitor mode using SMC instruction. Next from exception handler update NS (and HCE) bit in SCR (Secure Configuration Register) register ("1" for non-secure) and exit monitor exception handler in non-secure mode (PL1 to be able to switch into PL2). Additionally before SMC call monitor exception handler must be registered.
Such code (of course far more complicated e.g. due to multicore support) can be found in U-Boot bootloader (u-boot/arch/arm/cpu/armv7/nonsec_virt.S).
Fortunately for J6Eco DRA72x (and J6Entry - DRA71x) everything is already prepared and simple "SMC #1" call is enough to start hypervisor.
Example code:

.arch_extension sec
.arch_extension virt
.text
.align 2
.global start_hypervisor
.type start_hypervisor, function
start_hypervisor:
    ldr r12, =0x102
    ldr r0, =HYPERVISOR_ADDR
    smc #1

References