Skip to content

Commit

Permalink
skl: add patch to pass entry point in %ebx
Browse files Browse the repository at this point in the history
Done this way because things in SKL will change more drastically later
and there is no point in committing this.

Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
  • Loading branch information
SergiiDmytruk committed Nov 14, 2024
1 parent 50d4267 commit 422c3a0
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
From 4be25b0b35cf38d0dc3c3c6db674bfc36e6aa82f Mon Sep 17 00:00:00 2001
From: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Date: Wed, 13 Nov 2024 19:30:48 +0200
Subject: [PATCH] head: pass entry point address in %ebx to payload

Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
---
head.S | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/head.S b/head.S
index 4c57eed..ba14ae4 100644
--- a/head.S
+++ b/head.S
@@ -246,7 +246,7 @@ GLOBAL(_entry)
*/
/* Linux expects Zero Page address in %esi, it is already there */
/* Multiboot2 expects MBI address in %ebx and magic number in %eax */
- mov %esi, %ebx
+ mov %edi, %ebx
mov $MULTIBOOT2_BOOTLOADER_MAGIC, %eax
/* Simple payload expects argument on stack followed by return address */
push %esi
--
2.47.0
1 change: 1 addition & 0 deletions recipes-support/skl/skl_git.bb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=4641e94ec96f98fabc56ff9cc48be14b"
DEPENDS = "util-linux-native"

SRC_URI = "git://github.com/TrenchBoot/secure-kernel-loader.git;protocol=https;branch=${BRANCH};name=skl"
SRC_URI:append = " file://0001-head-pass-entry-point-address-in-ebx-to-payload.patch"
BRANCH = "master"
SRCREV = "1cc0a75191ed0309a6cc660533a8e044f40019d3"

Expand Down

0 comments on commit 422c3a0

Please sign in to comment.