This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Uefi.h> | |
#include <Library/UefiLib.h> | |
#include <Library/UefiBootServicesTableLib.h> | |
#include <Protocol/BlockIo.h> | |
#include <Protocol/LoadedImage.h> | |
#include <Protocol/SimpleFileSystem.h> | |
#include <Library/DevicePathLib.h> | |
#include <Guid/FileInfo.h> | |
#include <Library/MemoryAllocationLib.h> | |
#include <Library/BaseMemoryLib.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Uefi.h> | |
#include <Library/UefiLib.h> | |
#include <Library/UefiBootServicesTableLib.h> | |
#include <Protocol/BlockIo.h> | |
#include <Protocol/LoadedImage.h> | |
#include <Protocol/SimpleFileSystem.h> | |
#include <Library/DevicePathLib.h> | |
#include <Guid/FileInfo.h> | |
#include <Guid/Acpi.h> | |
#include <Library/MemoryAllocationLib.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//一部省略 | |
.globl _start | |
_start = V2P_WO(entry) | |
.globl wait_main | |
wait_main: | |
.long 0 | |
# Entering xv6 on boot processor, with paging off. | |
.globl entry | |
entry: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int | |
main(void) | |
{ | |
kinit1(end, P2V(4*1024*1024)); // phys page allocator | |
kvmalloc(); // kernel page table | |
mpinit(); // detect other processors | |
lapicinit(); // interrupt controller | |
seginit(); // segment descriptors | |
picinit(); // disable pic | |
ioapicinit(); // another interrupt controller |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void | |
mpinit(void) | |
{ | |
uchar *p, *e; | |
int ismp; | |
struct mp *mp; | |
struct mpconf *conf; | |
struct mpproc *proc; | |
struct mpioapic *ioapic; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
VOID *vendor_table; | |
Status = EfiGetSystemConfigurationTable(&gEfiAcpiTableGuid,&vendor_table); | |
struct rsdp *acpi_rsdp = (struct rsdp *)vendor_table; | |
Print(L"Signature:"); | |
UINTN i; | |
for(i=0;i<6;i++){ | |
Print(L"%c",acpi_rsdp->sig[i]); | |
} | |
Print(L"\n"); | |
Print(L"XSDT Address: %08x\n",acpi_rsdp->XsdtAddress); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct rsdp { | |
CHAR8 sig[8]; | |
UINT8 Checksum; | |
CHAR8 OEMID[6]; | |
UINT8 Revision; | |
UINT32 RsdtAddress; | |
UINT32 Len; | |
UINT64 XsdtAddress; | |
UINT8 ExtChecksum; | |
UINT8 reserved[3]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "types.h" | |
#include "defs.h" | |
#include "param.h" | |
#include "memlayout.h" | |
#include "x86.h" | |
#include "mmu.h" | |
#include "proc.h" | |
#include "mp_uefi.h" | |
#include "debug.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct uefi_madt { | |
uchar sig[4]; | |
uint len; | |
uchar rev; | |
uchar chksum; | |
uchar oem_id[6]; | |
uchar oem_table[8]; | |
uint oem_rev; | |
uint creator_id; | |
uint creator_rev; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"flag" | |
"fmt" | |
"log" | |
"os" | |
"os/exec" | |
"strings" | |
"net" |
OlderNewer