diff options
Diffstat (limited to 'util')
-rw-r--r-- | util/x86/x86_page_tables.go | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/util/x86/x86_page_tables.go b/util/x86/x86_page_tables.go index e03edeab19..22793654f0 100644 --- a/util/x86/x86_page_tables.go +++ b/util/x86/x86_page_tables.go @@ -38,6 +38,35 @@ var pdptCFilePtr = flag.String("pdpt_output_c_file", "", "File to write PDPT to var pdptBinFilePtr = flag.String("pdpt_output_bin_file", "", "File to write PDPT to in binary") var pagesBaseAddress = flag.Uint64("metadata_base_address", BASE_ADDR, "Physical base address where metadata pages allocated from") +var generatedCodeLicense string = +`/* + * Copyright 2018 Generated Code + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ` + "``" + `AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ +` + const ( PAT_UC = 0 PAT_WC = 1 @@ -144,6 +173,9 @@ func (cw *cWriter) WritePageEntry(data interface{}) error { } if cw.currentIndex == 0 { + if _, err := fmt.Fprint(cw.wr, generatedCodeLicense); err != nil { + return err + } includes := []string{ "stdint.h", } |