From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:400d:c09::22c; helo=mail-qk0-x22c.google.com; envelope-from=rafaelrodrigues.machado@gmail.com; receiver=edk2-devel@lists.01.org Received: from mail-qk0-x22c.google.com (mail-qk0-x22c.google.com [IPv6:2607:f8b0:400d:c09::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id CC3A721B02847 for ; Fri, 15 Dec 2017 03:41:11 -0800 (PST) Received: by mail-qk0-x22c.google.com with SMTP id b123so9971815qkg.7 for ; Fri, 15 Dec 2017 03:45:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=waI+mVYvs/w1YmPLQr5g6gtDYCSsBRNe59lnmKypxgE=; b=tsHWrtIcGTDO0VWQlLxc+gUmMyi9PbVWz0Eqnvop23aezfPMxgBp8yjCB8tOfwFw2Z uGvveHGhqKI80YCc3zEAvaiuAB5iGk4Bn1G4IRuRq+kLGaQ42gIXeExMMEBNKcgyf+ch 9KanFpT2GHIbBdLVelG2S57qa7bNiC5Tt31sUjtJn5MRrqscHVQc99v444Cf88sV/+LK 73g7FBTHS/IQwhwEO25QyC1ddSCpQDuNDBAeZfstW8+OszFAtIYyqlTGVFHIGPtsuw9P FlAkB8N5S65owOh7Qa/12C++DIV7PzYAvhI4IiQnZQU6tGh9yILzbdbJ6cf5CzXkVhRj cXGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=waI+mVYvs/w1YmPLQr5g6gtDYCSsBRNe59lnmKypxgE=; b=SpIGLvJCj2Esd3sSEg+rQPFWqQcSsWY7NdeP625CjtD5J3zsjRBJXdg1VX3nvsUlSR UtOnd4wpLQapuluIvn75FYtuGoBKChQvurcBmdkXvSOg11drc5XWbmtWcqmjgx+qYD9D 3Adm+gWkypA8jK6prSkdiRDhoxrHSr39oc4qydcJcppQXjfrVzBwzZucN4KKqdx3FR7C r8BCX+iNE3mkK0y0xUui/jsp46j45bxFltzdPTkClOfLW2hLuru9vlGKlW3p1xaJEGpt 3aRrrRxCtLi720aJTLFJQjxS6NkQ6DRC+uG7I7jZS3IbUv0HIovTiiL3KFAwQkmYjeP8 dDGg== X-Gm-Message-State: AKGB3mLxiPixiRAh3Cl9GnMXcSDT8oNdFVerWUjlXdea/GY9W2wsLj43 ekhNKDTevdqpHQOVRbUxuPD/USo6lVjU7xBQ7QI= X-Google-Smtp-Source: ACJfBosJltFHa+ZJbd1fm5YIGuew1ERbYv/po9wQkUWXrWz3BdlMZqM0gRxBrL/kH2V8fspbz8vRBj0Eh9nySqW88ZQ= X-Received: by 10.55.31.85 with SMTP id f82mr3527894qkf.237.1513338352261; Fri, 15 Dec 2017 03:45:52 -0800 (PST) MIME-Version: 1.0 From: Rafael Machado Date: Fri, 15 Dec 2017 11:45:41 +0000 Message-ID: To: "edk2-devel@lists.01.org" X-Content-Filtered-By: Mailman/MimeDel 2.1.22 Subject: UEFI App embedded on another uefi app X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Dec 2017 11:41:12 -0000 Content-Type: text/plain; charset="UTF-8" Hi Everyone. I have a limited space problem at a project. To solve this we had an idea, but would like to ask to you before expending time on trying to do it, due to some tight schedule. (We know that the best is to try before ask, but we do not have time for that now. Sorry for that.) The idea is to create a kind of DecompressorApp.efi, that uses EFI_DECOMPRESS_PROTOCOL During the compilation process of the application the tasks would be: - Compile App.efi - Compress App.efi, generating the App.efi.compressed (using tianoCompress.exe) - Compile the Decompressor.efi app (with the App.efi.compressed embedded) - The idea to do this is to add the compressed app as a Binary at the DecompressorApp.efi .inf file using the [Binaries] tag So during the entrypoint of the Decompressor.efi app, the application will need to copy the compressed part of the app (App.efi.compressed), to a buffer, and after that this buffer will be decompressed using the EFI_DECOMPRESS_PROTOCOL. Finally the execution control is passed to the App.efi decompressed (not sure how to do that yet). So the questions we have for know are: - How to detect the App.efi.compressed insyde the loaded app, so we can have an address to decompress - How to pass the application executions control to another app, that is in a buffer (not sure if this can be done with the EFI Boot Service LoadImage(), since this buffer does not have a valid file device path) Could you help us on understanding if this is possible? Thanks and Regards Rafael R. Machado