Rename Popcorn to jsix.

See README.md for more information.
This commit is contained in:
Justin C. Miller
2019-05-27 12:48:10 -07:00
parent 2b0cd6f2f2
commit 6285517ef7
17 changed files with 67 additions and 60 deletions

View File

@@ -40,7 +40,7 @@ console::initialize(const wchar_t *version)
CHECK_EFI_STATUS_OR_RETURN(status, "ClearScreen");
m_out->SetAttribute(m_out, EFI_LIGHTCYAN);
m_out->OutputString(m_out, (wchar_t *)L"Popcorn loader ");
m_out->OutputString(m_out, (wchar_t *)L"jsix loader ");
m_out->SetAttribute(m_out, EFI_LIGHTMAGENTA);
m_out->OutputString(m_out, (wchar_t *)version);

View File

@@ -6,6 +6,6 @@ GUID(0x964e5b22,0x6459,0x11d2,0x8e,0x39,0x00,0xa0,0xc9,0x69,0x72,0x3b, guid_simp
GUID(0x09576e91,0x6d3f,0x11d2,0x8e,0x39,0x00,0xa0,0xc9,0x69,0x72,0x3b, guid_device_path);
GUID(0x8b843e20,0x8132,0x4852,0x90,0xcc,0x55,0x1a,0x4e,0x4a,0x7f,0x1c, guid_device_path_to_text);
GUID(0x10d0669c,0x9ec6,0x4268,0xbc,0x48,0xff,0x74,0x75,0x21,0xfe,0x07, guid_popcorn_vendor);
GUID(0x10d0669c,0x9ec6,0x4268,0xbc,0x48,0xff,0x74,0x75,0x21,0xfe,0x07, guid_jsix_vendor);
// vim: ft=c

View File

@@ -51,15 +51,15 @@ detect_debug_mode(EFI_RUNTIME_SERVICES *run, kernel_args *header) {
uint8_t debug = 0;
UINTN var_size = sizeof(debug);
#ifdef __POPCORN_SET_DEBUG_UEFI_VAR__
debug = __POPCORN_SET_DEBUG_UEFI_VAR__;
#ifdef __JSIX_SET_DEBUG_UEFI_VAR__
debug = __JSIX_SET_DEBUG_UEFI_VAR__;
uint32_t attrs =
EFI_VARIABLE_NON_VOLATILE |
EFI_VARIABLE_BOOTSERVICE_ACCESS |
EFI_VARIABLE_RUNTIME_ACCESS;
status = run->SetVariable(
var_name,
&guid_popcorn_vendor,
&guid_jsix_vendor,
attrs,
var_size,
&debug);
@@ -68,14 +68,14 @@ detect_debug_mode(EFI_RUNTIME_SERVICES *run, kernel_args *header) {
status = run->GetVariable(
var_name,
&guid_popcorn_vendor,
&guid_jsix_vendor,
nullptr,
&var_size,
&debug);
CHECK_EFI_STATUS_OR_RETURN(status, "detect_debug_mode::GetVariable");
if (debug)
header->flags |= POPCORN_FLAG_DEBUG;
header->flags |= JSIX_FLAG_DEBUG;
return EFI_SUCCESS;
}

View File

@@ -7,7 +7,7 @@
#define DATA_HEADER_MAGIC 0x600dda7a
#define DATA_HEADER_VERSION 1
#define POPCORN_FLAG_DEBUG 0x00000001
#define JSIX_FLAG_DEBUG 0x00000001
#pragma pack(push, 1)
struct kernel_args {

View File

@@ -1,4 +1,4 @@
MAGIC equ 0x600db007 ; Popcorn OS header magic number
MAGIC equ 0x600db007 ; jsix OS header magic number
section .header
align 4

View File

@@ -37,7 +37,7 @@ init_console()
console *cons = new (&g_console) console(com1);
cons->set_color(0x21, 0x00);
cons->puts("Popcorn OS ");
cons->puts("jsix OS ");
cons->set_color(0x08, 0x00);
cons->puts(GIT_VERSION " booting...\n");
@@ -47,7 +47,7 @@ init_console()
void
kernel_main(kernel_args *header)
{
bool waiting = header && (header->flags && POPCORN_FLAG_DEBUG);
bool waiting = header && (header->flags && JSIX_FLAG_DEBUG);
while (waiting);
kutil::assert_set_callback(__kernel_assert);
@@ -71,7 +71,7 @@ kernel_main(kernel_args *header)
init_console();
log::debug(logs::boot, " Popcorn header is at: %016lx", header);
log::debug(logs::boot, " jsix header is at: %016lx", header);
log::debug(logs::boot, " Framebuffer is at: %016lx", header->frame_buffer);
log::debug(logs::boot, " Kernel data is at: %016lx", header->data);
log::debug(logs::boot, " Memory map is at: %016lx", header->memory_map);

View File

@@ -47,12 +47,12 @@ enum class efi_memory_type : uint32_t
efi_max,
popcorn_kernel = 0x80000000,
popcorn_data,
popcorn_initrd,
popcorn_scratch,
jsix_kernel = 0x80000000,
jsix_data,
jsix_initrd,
jsix_scratch,
popcorn_max
jsix_max
};
struct efi_memory_descriptor
@@ -123,9 +123,9 @@ public:
void add_used_frames(kutil::vm_space &vm) {
for (auto *desc : map) {
if (desc->type == efi_memory_type::popcorn_data ||
desc->type == efi_memory_type::popcorn_initrd ||
desc->type == efi_memory_type::popcorn_kernel)
if (desc->type == efi_memory_type::jsix_data ||
desc->type == efi_memory_type::jsix_initrd ||
desc->type == efi_memory_type::jsix_kernel)
{
uintptr_t virt_addr = desc->physical_start + kernel_offset;
vm.commit(virt_addr, desc->pages * frame_size);
@@ -135,9 +135,9 @@ public:
void page_in_kernel(page_manager &pm, page_table *pml4) {
for (auto *desc : map) {
if (desc->type == efi_memory_type::popcorn_kernel ||
desc->type == efi_memory_type::popcorn_data ||
desc->type == efi_memory_type::popcorn_initrd)
if (desc->type == efi_memory_type::jsix_kernel ||
desc->type == efi_memory_type::jsix_data ||
desc->type == efi_memory_type::jsix_initrd)
{
uintptr_t virt_addr = desc->physical_start + kernel_offset;
pm.page_in(pml4, desc->physical_start, virt_addr, desc->pages);

View File

@@ -1,7 +1,7 @@
#pragma once
/// \file initrd.h
/// Definitions defining the simple inital ramdisk file format used by the
/// popcorn kernel.
/// jsix kernel.
#include <stdint.h>
#include "kutil/vector.h"