Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
vicenteicc2008 authored Jun 21, 2024
0 parents commit 6f3b9ef
Show file tree
Hide file tree
Showing 291 changed files with 41,826 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/debug.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: C/C++ CI

on:
push:
branches: [ "sdcard" ]
pull_request:
branches: [ "sdcard" ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/[email protected]
- name: CI Build
run: chmod +x ci-build.sh && ./ci-build.sh

- uses: actions/upload-artifact@v3
with:
name: Y560
path: ./workspace/Y560.img
- uses: actions/upload-artifact@v3
with:
name: Lumia 650
path: ./workspace/emmc_appsboot.mbn
- uses: actions/upload-artifact@v3
with:
name: E1M
path: ./workspace/E1M.img
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
uefi.img
12
MSM8909_UEFI.fd.gz
BootShim/BootShim.bin
34 changes: 34 additions & 0 deletions BootShim/BootShim.S
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
.code 32
.text
.globl _start
_start:
/* see if we need to relocate */
adr r0, _Payload //Load the payload adress into r0

ldr r1, UefiBase //Load the expected payload base into r1
cmp r0, r1 //Compare the adresses
beq _Entry //Jump to entry if the adress is the same
ldr r2, UefiSize

_CopyLoop:
/* memcpy */
ldr r3, [r0], #4
str r3, [r1], #4
subs r2, r2, #4 //substract the size that got copied from fd size
bgt _CopyLoop //branch if greater than zero

/* we're relocated, jump to the right address */

_Entry:
ldr r5, UefiBase
bx r5

UefiBase:
.word UEFI_BASE

UefiSize:
.word UEFI_SIZE

.text
.align 4
_Payload:
3 changes: 3 additions & 0 deletions BootShim/Source.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Code inspired by:
* https://github.com/WOA-Project/SurfaceDuoPkg/tree/main/BootShim
* https://github.com/idaviden/kaikidan/blob/linaro-release/iPhone4Pkg/bl.s
15 changes: 15 additions & 0 deletions BootShim/makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
ARCH = arm
TARGET = arm-linux-gnueabi
CROSS_COMPILE = $(TARGET)-
CC = $(CROSS_COMPILE)gcc
OBJCOPY = $(CROSS_COMPILE)objcopy

all: BootShim.elf BootShim.bin

BootShim.bin: BootShim.elf
$(OBJCOPY) -O binary $< $@

BootShim.elf: BootShim.S
$(CC) -c $< -o $@ -DUEFI_BASE=$(UEFI_BASE) -DUEFI_SIZE=$(UEFI_SIZE)

BootShim.S:
Binary file added MSM8909Pkg/AcpiTables/CSRT.aml
Binary file not shown.
Binary file added MSM8909Pkg/AcpiTables/DBG2.aml
Binary file not shown.
Binary file added MSM8909Pkg/AcpiTables/DSDT.aml
Binary file not shown.
Binary file added MSM8909Pkg/AcpiTables/FACP.aml
Binary file not shown.
Binary file added MSM8909Pkg/AcpiTables/FACS.aml
Binary file not shown.
Binary file added MSM8909Pkg/AcpiTables/FPDT.aml
Binary file not shown.
Binary file added MSM8909Pkg/AcpiTables/GTDT.aml
Binary file not shown.
32 changes: 32 additions & 0 deletions MSM8909Pkg/AcpiTables/Include/Platform.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#ifndef __ACPI_MSM8909_PLATFORM_H__
#define __ACPI_MSM8909_PLATFORM_H__

#include <Library/AcpiLib.h>
#include <IndustryStandard/Acpi.h>

#define SIGNATURE4(a, b, c, d) ( \
((a) | (b << 8)) \
| \
((((c) | (d << 8)) << 16)) \
)

#define SIGNATURE8(a, b, c, d, e, f, g, h) ( \
SIGNATURE4 (a, b, c, d) \
| \
((UINT64) (SIGNATURE4 (e, f, g, h)) << 32) \
)

#define ACPI_OEM_ID 'Q','C','O','M',' ',' '
#define ACPI_OEM_TABLE_ID SIGNATURE8('Q','C','O','M','E','D','K','2')
#define ACPI_OEM_REVISION 0x00008909
#define ACPI_CREATOR_ID SIGNATURE4('Q','C','O','M')
#define ACPI_CREATOR_REVISION 0x00000001

#define ACPI_VENDOR_ID SIGNATURE4('Q','C','O','M')

#define SCSS_SYS_POR 0x01
#define HWIO_SCSS_RESET_ADDR 0x009020B4 // msmhwioreg.h

#define AP_CPU_COUNT 4

#endif
Binary file added MSM8909Pkg/AcpiTables/MADT.aml
Binary file not shown.
Binary file added MSM8909Pkg/AcpiTables/SSDT.aml
Binary file not shown.
Binary file added MSM8909Pkg/AcpiTables/TPM2.aml
Binary file not shown.
Loading

0 comments on commit 6f3b9ef

Please sign in to comment.