github.com/mvdan/u-root-coreutils@v0.0.0-20230122170626-c2eef2898555/pkg/boot/purgatory/purgatory.go (about) 1 // Copyright 2022 the u-root Authors. All rights reserved 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 package purgatory 6 7 // Purgatory abstracts a executable kexec purgatory in golang. 8 // 9 // What is a purgatory ? It is a binary object that runs between 10 // two kernels. See more https://lwn.net/Articles/582711/. 11 // 12 // We currently short circuit by generating purgatory executable 13 // via non-go toolchain. See generation logic from genpurg.go and 14 // finall generated golang purgatories code in asm.go 15 // 16 // See doc.go for more reading. 17 type Purgatory struct { 18 // Name is a human readable alis to this purgatory executable. 19 Name string 20 // Hexdump is a hexdump of the executabl. 21 Hexdump string 22 // Code is the executable code in bytes slice that will be loaded 23 // in memory as a kexec segment during kexec load. 24 Code []byte 25 }