secure_port_proxy.cc revision 14008
15132Sgblack@eecs.umich.edu/* 25132Sgblack@eecs.umich.edu * Copyright (c) 2012, 2018 ARM Limited 35132Sgblack@eecs.umich.edu * All rights reserved 45132Sgblack@eecs.umich.edu * 55132Sgblack@eecs.umich.edu * The license below extends only to copyright in the software and shall 65132Sgblack@eecs.umich.edu * not be construed as granting a license to any other intellectual 75132Sgblack@eecs.umich.edu * property including but not limited to intellectual property relating 85132Sgblack@eecs.umich.edu * to a hardware implementation of the functionality of the software 95132Sgblack@eecs.umich.edu * licensed hereunder. You may use the software subject to the license 105132Sgblack@eecs.umich.edu * terms below provided that you ensure that this notice is replicated 115132Sgblack@eecs.umich.edu * unmodified and in its entirety in all distributions of the software, 125132Sgblack@eecs.umich.edu * modified or unmodified, in source code or in binary form. 135132Sgblack@eecs.umich.edu * 145132Sgblack@eecs.umich.edu * Redistribution and use in source and binary forms, with or without 155132Sgblack@eecs.umich.edu * modification, are permitted provided that the following conditions are 165132Sgblack@eecs.umich.edu * met: redistributions of source code must retain the above copyright 175132Sgblack@eecs.umich.edu * notice, this list of conditions and the following disclaimer; 185132Sgblack@eecs.umich.edu * redistributions in binary form must reproduce the above copyright 195132Sgblack@eecs.umich.edu * notice, this list of conditions and the following disclaimer in the 205132Sgblack@eecs.umich.edu * documentation and/or other materials provided with the distribution; 215132Sgblack@eecs.umich.edu * neither the name of the copyright holders nor the names of its 225132Sgblack@eecs.umich.edu * contributors may be used to endorse or promote products derived from 235132Sgblack@eecs.umich.edu * this software without specific prior written permission. 245132Sgblack@eecs.umich.edu * 255132Sgblack@eecs.umich.edu * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 265132Sgblack@eecs.umich.edu * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 275132Sgblack@eecs.umich.edu * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 285132Sgblack@eecs.umich.edu * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 295132Sgblack@eecs.umich.edu * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 305132Sgblack@eecs.umich.edu * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 315132Sgblack@eecs.umich.edu * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 325132Sgblack@eecs.umich.edu * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 335132Sgblack@eecs.umich.edu * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 345132Sgblack@eecs.umich.edu * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 355132Sgblack@eecs.umich.edu * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 365132Sgblack@eecs.umich.edu * 375132Sgblack@eecs.umich.edu * Authors: Andreas Hansson 385132Sgblack@eecs.umich.edu */ 395132Sgblack@eecs.umich.edu 405132Sgblack@eecs.umich.edu#include "mem/secure_port_proxy.hh" 415132Sgblack@eecs.umich.edu 425132Sgblack@eecs.umich.edubool 435132Sgblack@eecs.umich.eduSecurePortProxy::tryReadBlob(Addr addr, uint8_t *p, int size) const 445132Sgblack@eecs.umich.edu{ 455132Sgblack@eecs.umich.edu readBlobPhys(addr, Request::SECURE, p, size); 465132Sgblack@eecs.umich.edu return true; 475132Sgblack@eecs.umich.edu} 485132Sgblack@eecs.umich.edu 495132Sgblack@eecs.umich.edubool 505132Sgblack@eecs.umich.eduSecurePortProxy::tryWriteBlob(Addr addr, const uint8_t *p, int size) const 515132Sgblack@eecs.umich.edu{ 525132Sgblack@eecs.umich.edu writeBlobPhys(addr, Request::SECURE, p, size); 535132Sgblack@eecs.umich.edu return true; 545132Sgblack@eecs.umich.edu} 555132Sgblack@eecs.umich.edu 565132Sgblack@eecs.umich.edubool 575132Sgblack@eecs.umich.eduSecurePortProxy::tryMemsetBlob(Addr addr, uint8_t v, int size) const 585612Sgblack@eecs.umich.edu{ 595625Sgblack@eecs.umich.edu memsetBlobPhys(addr, Request::SECURE, v, size); 605299Sgblack@eecs.umich.edu return true; 615132Sgblack@eecs.umich.edu} 625132Sgblack@eecs.umich.edu