[ARM] Add arm_clear_feature() helper macro

There is no reason why we should'nt have macro to clear VCPU feature
just like having macro to set VCPU feature.

Currently, arm_clear_feature() is not of much importance but it will
help us with VFP context switching for arm32 port.

Signed-off-by: Anup Patel <anup@brainfault.org>
[ARM] arm32: CPACR register is only available to ARMv6 or higher VCPUs

There was no CPACR register till ARMv6 hence ARMv5 or lower VCPUs
should get undefined instruction when accessing CPACR register.

This patch updates CP15 register read/write emulation as-per above.

Signed-off-by: Anup Patel <anup@brainfault.org>
[ARM] arm32: Add CPACR and ACTLR access macros.

The CPACR and ACTLR access macros were missing hence add it.

Signed-off-by: Anup Patel <anup@brainfault.org>
[ARM] arm32: Add CPACR register related defines

This patch adds CPACR register related defines to help access
CPACR register fields.

Signed-off-by: Anup Patel <anup@brainfault.org>
[ARM] arm32: Enable full-access to cp10 & cp11 for ARMv6 and ARMv7

For accessing VFP (i.e. coprocessors cp10 & cp11), we require to enable
cp10 & cp11 access in CPACR register for ARMv6 and ARMv7.

This is required to be done on all host CPUs hence we update cpu_init()
accordingly.

Signed-off-by: Anup Patel <anup@brainfault.org>
[ARM] arm32: Add support for VFP virtualization

This patch adds support for VFP virtualization in arm32 port.

The basic idea here is to allow cp10 & cp11 access to normal VCPUs
and monitor access to VFP control registers such as FPSID, FPSCR,
FPEXC, FPINST, FPINST2, MVFR0, and MVFR1.

The patch has been tested on VersatilePB, Realview-EB-MPCore,
Realview-PB-A8, and VExpress-A9 host emulated by QEMU.

More testing will follow on real hardware but for now this is fine.

Signed-off-by: Anup Patel <anup@brainfault.org>
[TESTS] Enable VFP usage for various linux guests and busybox

We have VFP virtualization available in arm32, arm32ve and arm64
ports hence we can now freely use hard-float (i.e. VFP support)
for all types of arm32 guests and busybox based root filesystem.

Signed-off-by: Anup Patel <anup@brainfault.org>
[x86] IDE Frame work and PIIX3 support.

Signed-off-by: Himanshu Chauhan <hschauhan@nulltrace.org>
[x86] Add more room in boot page tables.

As more layers are enabled in x86 port, the current
size of boot pagetables start falling short. Add more
space to it until more generic version of overriding
boot pagetables is done.

Signed-off-by: Himanshu Chauhan <hschauhan@nulltrace.org>
Merge remote-tracking branch 'upstream/master' into A20
[ARM] Minor fix ldc and stc instruction emulation.

We were not updating 'index' for ldcstc_xxx() callbacks in
ldc and std instruction emulations hence this patch.

Signed-off-by: Anup Patel <anup@brainfault.org>
[COMMANDS] Fixed a PA increment in VFS load

vfs load command was loading block of data at
the same physical address.

Signed-off-by: Himanshu Chauhan <hschauhan@nulltrace.org>
[DRIVERS] mmc: Fix SD card detection logic.

Currently there were following issues:
1. __mmc_send_if_cond() will generally fails on systems with eMMC
or normal MMC cards. This does not mean we should fail immediately.
2. __sd_send_op_cond() did not validate the OCR value returned by
ACMD41 commands. We should have atleast one valid voltage in OCR
returned ACMD41 after SD card is in powerup state. If the returned
OCR does not have valid voltage bits set then we don't have a valid
SD card.

The above described issues easily manifest on ARM Fast Models
because it emulates:
a. SD card (compliant with MMCv3.4) for image file < 2GB
b. eMMC card (compliant with MMCv4.4) for image file >= 2GB

This patch primarily fixes __mmc_detect_card_inserted() by fixing
above described issues so that we properly distinguish between
SD and MMC cards.

Signed-off-by: Anup Patel <anup@brainfault.org>
Merge remote-tracking branch 'upstream/master' into A20