1199767f8SToomas Soome/*
2199767f8SToomas Soome * This file and its contents are supplied under the terms of the
3199767f8SToomas Soome * Common Development and Distribution License ("CDDL"), version 1.0.
4199767f8SToomas Soome * You may only use this file in accordance with the terms of version
5199767f8SToomas Soome * 1.0 of the CDDL.
6199767f8SToomas Soome *
7199767f8SToomas Soome * A full copy of the text of the CDDL should have accompanied this
8199767f8SToomas Soome * source.  A copy of the CDDL is also available via the Internet at
9199767f8SToomas Soome * http://www.illumos.org/license/CDDL.
10199767f8SToomas Soome */
11199767f8SToomas Soome
12199767f8SToomas Soome/*
1323274804SToomas Soome * Copyright 2018 Toomas Soome <tsoome@me.com>
14199767f8SToomas Soome */
15199767f8SToomas Soome
16*5ac07b12SToomas Soome	.file	"mb_header.S"
17199767f8SToomas Soome
18199767f8SToomas Soome/*
19199767f8SToomas Soome * Provide fake multiboot header to support versioning and partition
2023274804SToomas Soome * start. The fake MB header is used by versioning code located in
2123274804SToomas Soome * usr/src/cmd/boot/common. Since the BIOS bootblock is stored on raw disk,
2223274804SToomas Soome * this fake header is used to store the location of the version info block.
2323274804SToomas Soome * Additionally we use it to store partition start_sector, so we can identify
2423274804SToomas Soome * our root file system partition. Note we are using LBA64 here.
25199767f8SToomas Soome */
26199767f8SToomas Soome
27199767f8SToomas Soome#define	ASM_FILE
2823274804SToomas Soome#include <sys/multiboot.h>
29199767f8SToomas Soome
30199767f8SToomas Soome		.globl mb_header, start_sector
31199767f8SToomas Soome		.text
32199767f8SToomas Soome
33199767f8SToomas Soome		.align 4
34199767f8SToomas Soomemb_header:
35199767f8SToomas Soome		.long	MULTIBOOT_HEADER_MAGIC
36199767f8SToomas Soome		.long	MULTIBOOT_AOUT_KLUDGE
38199767f8SToomas Soome		.long	0                       /* header_addr */
39199767f8SToomas Soome		.long	0                       /* load_addr */
40199767f8SToomas Soome		.long	0                       /* load_end_addr */
41199767f8SToomas Soomestart_sector:	.long	0			/* partition LBA */
42199767f8SToomas Soome		.long	0
43199767f8SToomas Soome