rmodules: add support for rmodtool

The following patches were taken from upstreamed and
massaged to work in our repo. The patches are squashed
together.

http://review.coreboot.org/5120
http://review.coreboot.org/5364
http://review.coreboot.org/5365
http://review.coreboot.org/5366
http://review.coreboot.org/5367
http://review.coreboot.org/5368
http://review.coreboot.org/5369
http://review.coreboot.org/5370
http://review.coreboot.org/5371
http://review.coreboot.org/5372
http://review.coreboot.org/5384
http://review.coreboot.org/5373
http://review.coreboot.org/5374
http://review.coreboot.org/5375
http://review.coreboot.org/5376
http://review.coreboot.org/5377
http://review.coreboot.org/5363
http://review.coreboot.org/5378
http://review.coreboot.org/5379
http://review.coreboot.org/5407

BUG=chrome-os-partner:27094
BRANCH=None
CQ-DEPEND=CL:*157856
TEST=Built and booted rambi with these set of patches.

Change-Id: I481352b23f6b60ff495c1a6bd3c21b52d817de3d
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/190921
Reviewed-by: Gabe Black <gabeblack@chromium.org>
This commit is contained in:
Ronald G. Minnich 2014-02-04 17:35:44 -08:00 committed by chrome-internal-fetch
commit 5d262f8dd4
41 changed files with 1865 additions and 438 deletions

View file

@ -55,6 +55,7 @@ VB_INCLUDES += -I$(VB_SOURCE)/firmware/include
INCLUDES += $(VB_INCLUDES)
VBOOT_STUB_ELF = $(obj)/vendorcode/google/chromeos/vbootstub.elf
VBOOT_STUB = $(VBOOT_STUB_ELF).rmod
VBOOT_STUB_DOTO = $(VBOOT_STUB_ELF:.elf=.o)
# Dependency for the vboot rmodules. Ordering matters.

View file

@ -28,10 +28,6 @@
#include "vboot_context.h"
#include "vboot_handoff.h"
static void vboot_wrapper(struct vboot_context *context);
DEFINE_RMODULE_HEADER(vboot_wrapper_header, vboot_wrapper, RMODULE_TYPE_VBOOT);
/* Keep a global context pointer around for the callbacks to use. */
static struct vboot_context *gcontext;
@ -67,12 +63,14 @@ static void parse_component(const struct components *components, int num,
fw->size = (uint32_t)components->entries[num].size;
}
static void vboot_wrapper(struct vboot_context *context)
static void vboot_wrapper(void *arg)
{
int i;
VbError_t res;
const struct components *components;
struct vboot_context *context;
context = arg;
gcontext = context;
VbExDebug("Calling VbInit()\n");
@ -276,3 +274,4 @@ VbError_t VbExTpmSendReceive(const uint8_t *request, uint32_t request_length,
return VBERROR_SUCCESS;
}
RMODULE_ENTRY(vboot_wrapper);