secure_port_proxy.cc revision 14009
114007Sgabeblack@google.com/* 214007Sgabeblack@google.com * Copyright (c) 2012, 2018 ARM Limited 314007Sgabeblack@google.com * All rights reserved 414007Sgabeblack@google.com * 514007Sgabeblack@google.com * The license below extends only to copyright in the software and shall 614007Sgabeblack@google.com * not be construed as granting a license to any other intellectual 714007Sgabeblack@google.com * property including but not limited to intellectual property relating 814007Sgabeblack@google.com * to a hardware implementation of the functionality of the software 914007Sgabeblack@google.com * licensed hereunder. You may use the software subject to the license 1014007Sgabeblack@google.com * terms below provided that you ensure that this notice is replicated 1114007Sgabeblack@google.com * unmodified and in its entirety in all distributions of the software, 1214007Sgabeblack@google.com * modified or unmodified, in source code or in binary form. 1314007Sgabeblack@google.com * 1414007Sgabeblack@google.com * Redistribution and use in source and binary forms, with or without 1514007Sgabeblack@google.com * modification, are permitted provided that the following conditions are 1614007Sgabeblack@google.com * met: redistributions of source code must retain the above copyright 1714007Sgabeblack@google.com * notice, this list of conditions and the following disclaimer; 1814007Sgabeblack@google.com * redistributions in binary form must reproduce the above copyright 1914007Sgabeblack@google.com * notice, this list of conditions and the following disclaimer in the 2014007Sgabeblack@google.com * documentation and/or other materials provided with the distribution; 2114007Sgabeblack@google.com * neither the name of the copyright holders nor the names of its 2214007Sgabeblack@google.com * contributors may be used to endorse or promote products derived from 2314007Sgabeblack@google.com * this software without specific prior written permission. 2414007Sgabeblack@google.com * 2514007Sgabeblack@google.com * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 2614007Sgabeblack@google.com * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 2714007Sgabeblack@google.com * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 2814007Sgabeblack@google.com * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 2914007Sgabeblack@google.com * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 3014007Sgabeblack@google.com * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 3114007Sgabeblack@google.com * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 3214007Sgabeblack@google.com * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 3314007Sgabeblack@google.com * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 3414007Sgabeblack@google.com * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 3514007Sgabeblack@google.com * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 3614007Sgabeblack@google.com * 3714007Sgabeblack@google.com * Authors: Andreas Hansson 3814007Sgabeblack@google.com */ 3914007Sgabeblack@google.com 4014007Sgabeblack@google.com#include "mem/secure_port_proxy.hh" 4114007Sgabeblack@google.com 4214008Sgabeblack@google.combool 4314009Sgabeblack@google.comSecurePortProxy::tryReadBlob(Addr addr, void *p, int size) const 4414007Sgabeblack@google.com{ 4514007Sgabeblack@google.com readBlobPhys(addr, Request::SECURE, p, size); 4614008Sgabeblack@google.com return true; 4714007Sgabeblack@google.com} 4814007Sgabeblack@google.com 4914008Sgabeblack@google.combool 5014009Sgabeblack@google.comSecurePortProxy::tryWriteBlob(Addr addr, const void *p, int size) const 5114007Sgabeblack@google.com{ 5214007Sgabeblack@google.com writeBlobPhys(addr, Request::SECURE, p, size); 5314008Sgabeblack@google.com return true; 5414007Sgabeblack@google.com} 5514007Sgabeblack@google.com 5614008Sgabeblack@google.combool 5714008Sgabeblack@google.comSecurePortProxy::tryMemsetBlob(Addr addr, uint8_t v, int size) const 5814007Sgabeblack@google.com{ 5914007Sgabeblack@google.com memsetBlobPhys(addr, Request::SECURE, v, size); 6014008Sgabeblack@google.com return true; 6114007Sgabeblack@google.com} 62