[ipxe-devel] iPXE MemoryAllocationLib.c assert failures on Dell PowerEdge

Daniel.Johnson1 at dell.com Daniel.Johnson1 at dell.com
Fri Feb 2 22:45:22 UTC 2018


I'm a colleague of Lynn's and wanted to put my old C experience to use here, but have hit a snag.  I'm attempting to insert my hook early in iPXE's execution through __init_fn but it never executes.  The debug text strings don't even appear in the final binary unless I stuff the code into something else, like 'core/device.c'.  Am I missing something in the following code?

/* Relevant includes: */
#include <stdio.h>
#include <errno.h>
#include <ipxe/efi/efi.h>
#include <ipxe/init.h>

/* Skipping the meat of the hook/wrap code */

static void dj1_wrap_init(void) {
        printf("DJ1_wrap_init - Called\n");
        /* The start/stop logic depends on this value being NULL when we start */
        dj1_orig_FreePool = NULL;

        /* CAUTION: If this is uncommented we enable wrapping for ALL of these calls! */
        dj1_wrap_start();
}

/**
* Prepare for FreePool wrapping - This tells core/init.c to call dj1_wrap_init()
*/
struct init_fn dj1_efi_wrap_init_fn __init_fn ( INIT_EARLY ) = {
        .initialise = dj1_wrap_init,
};



Daniel Johnson
Master Engineer, Enterprise Solutions Support Team
Dell EMC | Global Support & Deployment
Office +1-512-728-0913
Daniel.Johnson1 at Dell.com<mailto:Daniel.Johnson1 at Dell.com>

My work schedule is 07:00 am - 6:00 pm Wednesday-Saturday CT.
Customer feedback | How am I doing? Please contact my manager steve.king at dell.com<mailto:steve.king at dell.com>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ipxe.org/pipermail/ipxe-devel/attachments/20180202/66339535/attachment.htm>


More information about the ipxe-devel mailing list