mirror of
https://github.com/jamesstringer90/appsandbox.git
synced 2026-10-22 11:03:15 -05:00
Run Windows 11 ARM64 guests on macOS over QEMU+HVF, with an ivshmem shared-memory transport carrying every guest channel (agent control, display/VDD, input, audio, clipboard, SSH, 9P) - no guest networking required. - tools/transport: one guest transport API, two backends (PC AF_HYPERV, Mac ivshmem); SPSC ring with an acquire-barrier fix for SSH integrity - tools/ivshmem: our own KMDF ivshmem BAR-mapping driver (no third party) - src/backend_mac: Mac-host ivshmem transport, QEMU VM lifecycle, IDD display consumer, agent/SSH proxies, ISO->disk patcher, Windows create - tools/agent + channel EXEs + tools/vdd: wired to asb_transport - tools/agent_win: staged guest payload (interim, pending JIT pull) - vendor/qemu-ivshmem: vendored QEMU 11.0.1 fork (ivshmem-plain) + LGPL source mirror for the self-contained app bundle - tools/sign/make-release.ps1: use the host-native ARM64 MSBuild so the WDK driver ApiValidator runs (the x86 validator fails on ARM64)
36 lines
1.6 KiB
C
36 lines
1.6 KiB
C
/*
|
|
* bcd_patch -- build a UEFI Windows-boot BCD store from the per-ISO BCD-Template.
|
|
*
|
|
* Reads \Windows\System32\config\BCD-Template (extracted fresh from the provided
|
|
* ISO's install.wim), and produces a working \EFI\Microsoft\Boot\BCD by:
|
|
* - overwriting {bootmgr}.23000003 (displayorder placeholder) -> the OS loader,
|
|
* - CREATING the device/osdevice/default/path elements that the template lacks
|
|
* (carved into a freshly appended hbin), pointing at our GPT partitions,
|
|
* - fixing the base-block sequence numbers + XOR checksum.
|
|
*
|
|
* No external dependencies. See docs/appsandbox/BCD-BUILD-SPEC.md for the
|
|
* regf + BCD-device-element layout this implements.
|
|
*/
|
|
#ifndef ASB_BCD_PATCH_H
|
|
#define ASB_BCD_PATCH_H
|
|
|
|
#include <stdint.h>
|
|
#include <stddef.h>
|
|
|
|
/* All 16-byte GUIDs are in GPT/registry mixed-endian on-disk form — i.e. exactly
|
|
* the bytes our gpt.c writes into the partition-entry/header GUID fields. Copy
|
|
* them straight from the GPT structures; do NOT re-encode. */
|
|
typedef struct {
|
|
uint8_t disk_guid[16]; /* GPT header DiskGUID */
|
|
uint8_t esp_part_guid[16]; /* ESP partition unique GUID -> {bootmgr} device */
|
|
uint8_t win_part_guid[16]; /* Windows partition unique GUID -> loader device/osdevice */
|
|
} bcd_guids_t;
|
|
|
|
/* Build the patched BCD. `tpl`/`tpl_len` = the raw BCD-Template hive bytes.
|
|
* On success returns 0 and sets *out (malloc'd) / *out_len to the finished hive
|
|
* (write it verbatim to the ESP). Returns non-zero on malformed input. */
|
|
int bcd_build(const uint8_t *tpl, size_t tpl_len, const bcd_guids_t *g,
|
|
uint8_t **out, size_t *out_len);
|
|
|
|
#endif /* ASB_BCD_PATCH_H */
|