baseport/syborg/specific/syborg.cia
author Gareth Stockwell <gareth.stockwell@accenture.com>
Mon, 06 Sep 2010 16:25:43 +0100
changeset 106 3bc1a978be44
parent 79 80387fbc46c5
permissions -rw-r--r--
Fix for Bug 3671 - QEMU GDB stub listens on IPv6-only port on Windows 7 The connection string used by the GDB stub does not specify which version of the Internet Protocol should be used by the port on which it listens. On host platforms with IPv6 support, such as Windows 7, this means that the stub listens on an IPv6-only port. Since the GDB client uses IPv4, this means that the client cannot connect to QEMU.

/*
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of the License "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description:
*
*/

#include <syborg_priv.h>

//
//	Timer Access Functions
//

// Set the starting count value for a timer
EXPORT_C void __NAKED__ TSyborg::SetTimerLoad(TUint /*aTimerBase*/, TUint32 /*aValue*/)
{
  asm("str r1, [r0, #12]");
  asm("bx lr");
}

// Read the load register (starting count value)
EXPORT_C TUint __NAKED__ TSyborg::TimerLoad(TUint /*aTimerBase*/)
{
  asm("ldr r0, [r0, #12]");
  asm("bx lr");
}

// Read the actual timer value
EXPORT_C TUint __NAKED__ TSyborg::TimerValue(TUint /*aTimerBase*/)
{
	asm("ldr r0, [r0, #16]");
    asm("bx lr");
}

// Clear the timer interrupt by writing a value to Timer x clear register
// The written value doesn't matter as any value will clear the interrupt.
EXPORT_C void __NAKED__ TSyborg::ClearTimerInt(TUint /*aTimerBase*/)
{
	asm("mov r1, #1");	
	asm("str r1, [r0, #24]");
    asm("bx lr");
}

//
//Interrupt Controller Acces Functions
//

// Enable specified motherboard Int on either the PIC/SIC
EXPORT_C void __NAKED__ TSyborg::EnableInt(TUint /*anId*/)
{
  asm("ldr r1, __KHwInt");
  asm("str r0, [r1, #20]");
  asm("bx lr");
}

// Disable specified motherboard Int on either the PIC/SIC
EXPORT_C void __NAKED__ TSyborg::DisableInt(TUint /*anId*/)
{
  asm("ldr r1, __KHwInt");
  asm("str r0, [r1, #16]");
  asm("bx lr");
	
	asm("__KHwInt:");
	asm(".word %a0" : : "i" ((TInt)(KHwBaseSic)));
}