diff options
Diffstat (limited to 'dev/ZBA')
| -rw-r--r-- | dev/ZBA/BootKit/Vendor/stb_image.hxx | 46 | ||||
| -rw-r--r-- | dev/ZBA/ReadMe.md | 4 | ||||
| -rw-r--r-- | dev/ZBA/Sources/HEL/64X000/Boot64x0.S | 2 | ||||
| -rw-r--r-- | dev/ZBA/Sources/HEL/AMD64/BootFileReader.cxx | 6 | ||||
| -rw-r--r-- | dev/ZBA/Sources/HEL/AMD64/BootMain.cxx | 6 | ||||
| -rw-r--r-- | dev/ZBA/amd64-efi.make | 4 |
6 files changed, 34 insertions, 34 deletions
diff --git a/dev/ZBA/BootKit/Vendor/stb_image.hxx b/dev/ZBA/BootKit/Vendor/stb_image.hxx index 705abeb6..ca4576d7 100644 --- a/dev/ZBA/BootKit/Vendor/stb_image.hxx +++ b/dev/ZBA/BootKit/Vendor/stb_image.hxx @@ -257,7 +257,7 @@ RECENT REVISION HISTORY: // // SIMD support // -// The JPEG decoder will try to automatically use SIMD kernels on x86 when +// The JPEG decoder will try to automatically use SIMD Kernels on x86 when // supported by the compiler. For ARM Neon support, you must explicitly // request it. // @@ -2143,7 +2143,7 @@ static stbi_uc* stbi__hdr_to_ldr(float* data, int x, int y, int comp) // - quality integer IDCT derived from IJG's 'slow' // performance // - fast huffman; reasonable integer IDCT -// - some SIMD kernels for common paths on targets with SSE2/NEON +// - some SIMD Kernels for common paths on targets with SSE2/NEON // - uses a lot of intermediate memory, could cache poorly #ifndef STBI_NO_JPEG @@ -2210,10 +2210,10 @@ typedef struct int scan_n, order[4]; int restart_interval, todo; - // kernels - void (*idct_block_kernel)(stbi_uc* out, int out_stride, short data[64]); - void (*YCbCr_to_RGB_kernel)(stbi_uc* out, const stbi_uc* y, const stbi_uc* pcb, const stbi_uc* pcr, int count, int step); - stbi_uc* (*resample_row_hv_2_kernel)(stbi_uc* out, stbi_uc* in_near, stbi_uc* in_far, int w, int hs); + // Kernels + void (*idct_block_Kernel)(stbi_uc* out, int out_stride, short data[64]); + void (*YCbCr_to_RGB_Kernel)(stbi_uc* out, const stbi_uc* y, const stbi_uc* pcb, const stbi_uc* pcr, int count, int step); + stbi_uc* (*resample_row_hv_2_Kernel)(stbi_uc* out, stbi_uc* in_near, stbi_uc* in_far, int w, int hs); } stbi__jpeg; static int stbi__build_huffman(stbi__huffman* h, int* count) @@ -3330,7 +3330,7 @@ static int stbi__parse_entropy_coded_data(stbi__jpeg* z) int ha = z->img_comp[n].ha; if (!stbi__jpeg_decode_block(z, data, z->huff_dc + z->img_comp[n].hd, z->huff_ac + ha, z->fast_ac[ha], n, z->dequant[z->img_comp[n].tq])) return 0; - z->idct_block_kernel(z->img_comp[n].data + z->img_comp[n].w2 * j * 8 + i * 8, z->img_comp[n].w2, data); + z->idct_block_Kernel(z->img_comp[n].data + z->img_comp[n].w2 * j * 8 + i * 8, z->img_comp[n].w2, data); // every data block is an MCU, so countdown the restart interval if (--z->todo <= 0) { @@ -3369,7 +3369,7 @@ static int stbi__parse_entropy_coded_data(stbi__jpeg* z) int ha = z->img_comp[n].ha; if (!stbi__jpeg_decode_block(z, data, z->huff_dc + z->img_comp[n].hd, z->huff_ac + ha, z->fast_ac[ha], n, z->dequant[z->img_comp[n].tq])) return 0; - z->idct_block_kernel(z->img_comp[n].data + z->img_comp[n].w2 * y2 + x2, z->img_comp[n].w2, data); + z->idct_block_Kernel(z->img_comp[n].data + z->img_comp[n].w2 * y2 + x2, z->img_comp[n].w2, data); } } } @@ -3494,7 +3494,7 @@ static void stbi__jpeg_finish(stbi__jpeg* z) { short* data = z->img_comp[n].coeff + 64 * (i + j * z->img_comp[n].coeff_w); stbi__jpeg_dequantize(data, z->dequant[z->img_comp[n].tq]); - z->idct_block_kernel(z->img_comp[n].data + z->img_comp[n].w2 * j * 8 + i * 8, z->img_comp[n].w2, data); + z->idct_block_Kernel(z->img_comp[n].data + z->img_comp[n].w2 * j * 8 + i * 8, z->img_comp[n].w2, data); } } } @@ -4362,26 +4362,26 @@ static void stbi__YCbCr_to_RGB_simd(stbi_uc* out, stbi_uc const* y, stbi_uc cons } #endif -// set up the kernels +// set up the Kernels static void stbi__setup_jpeg(stbi__jpeg* j) { - j->idct_block_kernel = stbi__idct_block; - j->YCbCr_to_RGB_kernel = stbi__YCbCr_to_RGB_row; - j->resample_row_hv_2_kernel = stbi__resample_row_hv_2; + j->idct_block_Kernel = stbi__idct_block; + j->YCbCr_to_RGB_Kernel = stbi__YCbCr_to_RGB_row; + j->resample_row_hv_2_Kernel = stbi__resample_row_hv_2; #ifdef STBI_SSE2 if (stbi__sse2_available()) { - j->idct_block_kernel = stbi__idct_simd; - j->YCbCr_to_RGB_kernel = stbi__YCbCr_to_RGB_simd; - j->resample_row_hv_2_kernel = stbi__resample_row_hv_2_simd; + j->idct_block_Kernel = stbi__idct_simd; + j->YCbCr_to_RGB_Kernel = stbi__YCbCr_to_RGB_simd; + j->resample_row_hv_2_Kernel = stbi__resample_row_hv_2_simd; } #endif #ifdef STBI_NEON - j->idct_block_kernel = stbi__idct_simd; - j->YCbCr_to_RGB_kernel = stbi__YCbCr_to_RGB_simd; - j->resample_row_hv_2_kernel = stbi__resample_row_hv_2_simd; + j->idct_block_Kernel = stbi__idct_simd; + j->YCbCr_to_RGB_Kernel = stbi__YCbCr_to_RGB_simd; + j->resample_row_hv_2_Kernel = stbi__resample_row_hv_2_simd; #endif } @@ -4479,7 +4479,7 @@ static stbi_uc* load_jpeg_image(stbi__jpeg* z, int* out_x, int* out_y, int* comp else if (r->hs == 2 && r->vs == 1) r->resample = stbi__resample_row_h_2; else if (r->hs == 2 && r->vs == 2) - r->resample = z->resample_row_hv_2_kernel; + r->resample = z->resample_row_hv_2_Kernel; else r->resample = stbi__resample_row_generic; } @@ -4530,7 +4530,7 @@ static stbi_uc* load_jpeg_image(stbi__jpeg* z, int* out_x, int* out_y, int* comp } else { - z->YCbCr_to_RGB_kernel(out, y, coutput[1], coutput[2], z->s->img_x, n); + z->YCbCr_to_RGB_Kernel(out, y, coutput[1], coutput[2], z->s->img_x, n); } } else if (z->s->img_n == 4) @@ -4549,7 +4549,7 @@ static stbi_uc* load_jpeg_image(stbi__jpeg* z, int* out_x, int* out_y, int* comp } else if (z->app14_color_transform == 2) { // YCCK - z->YCbCr_to_RGB_kernel(out, y, coutput[1], coutput[2], z->s->img_x, n); + z->YCbCr_to_RGB_Kernel(out, y, coutput[1], coutput[2], z->s->img_x, n); for (i = 0; i < z->s->img_x; ++i) { stbi_uc m = coutput[3][i]; @@ -4561,7 +4561,7 @@ static stbi_uc* load_jpeg_image(stbi__jpeg* z, int* out_x, int* out_y, int* comp } else { // YCbCr + alpha? Ignore the fourth channel for now - z->YCbCr_to_RGB_kernel(out, y, coutput[1], coutput[2], z->s->img_x, n); + z->YCbCr_to_RGB_Kernel(out, y, coutput[1], coutput[2], z->s->img_x, n); } } else diff --git a/dev/ZBA/ReadMe.md b/dev/ZBA/ReadMe.md index 0fa9cf62..626f1154 100644 --- a/dev/ZBA/ReadMe.md +++ b/dev/ZBA/ReadMe.md @@ -2,13 +2,13 @@ You need: -- MinGW for the kernel and bootloader. +- MinGW for the Kernel and bootloader. - Netwide Assembler to output COFF object code. Start by cloning the repo: ``` -git clone git@bitbucket.org:mahrouss/microkernel.git +git clone git@bitbucket.org:mahrouss/microKernel.git ``` And then execute: diff --git a/dev/ZBA/Sources/HEL/64X000/Boot64x0.S b/dev/ZBA/Sources/HEL/64X000/Boot64x0.S index 271a3f28..cd9662f2 100644 --- a/dev/ZBA/Sources/HEL/64X000/Boot64x0.S +++ b/dev/ZBA/Sources/HEL/64X000/Boot64x0.S @@ -7,7 +7,7 @@ .section .boot_hdr .align 4 -/* NewBoot boot header begin for a 64x000 kernel. */ +/* NewBoot boot header begin for a 64x000 Kernel. */ boot_hdr_mag: .ascii "CB" diff --git a/dev/ZBA/Sources/HEL/AMD64/BootFileReader.cxx b/dev/ZBA/Sources/HEL/AMD64/BootFileReader.cxx index 5686318b..c8e0bb4e 100644 --- a/dev/ZBA/Sources/HEL/AMD64/BootFileReader.cxx +++ b/dev/ZBA/Sources/HEL/AMD64/BootFileReader.cxx @@ -75,9 +75,9 @@ BFileReader::BFileReader(const CharacterTypeUTF16* path, return; } - EfiFileProtocol* kernelFile = nullptr; + EfiFileProtocol* KernelFile = nullptr; - if (mRootFs->Open(mRootFs, &kernelFile, mPath, kEFIFileRead, kEFIReadOnly) != + if (mRootFs->Open(mRootFs, &KernelFile, mPath, kEFIFileRead, kEFIReadOnly) != kEfiOk) { mWriter.Write(L"newosldr: Fetch-Protocol: No-Such-Path: ") @@ -91,7 +91,7 @@ BFileReader::BFileReader(const CharacterTypeUTF16* path, } mSizeFile = 0; - mFile = kernelFile; + mFile = KernelFile; mErrorCode = kOperationOkay; } diff --git a/dev/ZBA/Sources/HEL/AMD64/BootMain.cxx b/dev/ZBA/Sources/HEL/AMD64/BootMain.cxx index 824cee06..330dc96a 100644 --- a/dev/ZBA/Sources/HEL/AMD64/BootMain.cxx +++ b/dev/ZBA/Sources/HEL/AMD64/BootMain.cxx @@ -189,9 +189,9 @@ EFI_EXTERN_C EFI_API Int Main(EfiHandlePtr ImageHandle, handoverHdrPtr->f_VirtualStart = (VoidPtr)Descriptor[cDefaultMemoryMap].VirtualStart; - handoverHdrPtr->f_HeapStart = nullptr; + handoverHdrPtr->f_HeapStart = 0; - while (BS->AllocatePool(EfiLoaderCode, kHandoverHeapSz, &handoverHdrPtr->f_HeapStart) != kEfiOk) + while (BS->AllocatePool(EfiRuntimeServicesCode, kHandoverHeapSz, &handoverHdrPtr->f_HeapStart) != kEfiOk) ; handoverHdrPtr->f_VirtualSize = @@ -268,7 +268,7 @@ EFI_EXTERN_C EFI_API Int Main(EfiHandlePtr ImageHandle, EFI::ExitBootServices(MapKey, ImageHandle); // ---------------------------------------------------- // - // finally load kernel. + // finally load Kernel. // ---------------------------------------------------- // loader->Start(handoverHdrPtr); diff --git a/dev/ZBA/amd64-efi.make b/dev/ZBA/amd64-efi.make index 3cf9e0f2..733c8474 100644 --- a/dev/ZBA/amd64-efi.make +++ b/dev/ZBA/amd64-efi.make @@ -29,14 +29,14 @@ IMG=epm-master-1.img IMG_2=epm-slave.img IMG_3=epm-master-2.img -EMU_FLAGS=-net none -smp 4 -m 8G -M q35 \ +EMU_FLAGS=-net none -m 12G -M q35 \ -bios $(BIOS) -device piix3-ide,id=ide \ -drive id=disk,file=$(IMG),format=raw,if=none \ -device ide-hd,drive=disk,bus=ide.0 -drive \ file=fat:rw:Sources/Root/,index=2,format=raw \ -drive id=disk_2,file=$(IMG_2),if=none \ -device ahci,id=ahci \ - -device ide-hd,drive=disk_2,bus=ahci.0 + -device ide-hd,drive=disk_2,bus=ahci.0 -d int LD_FLAGS=-e Main --subsystem=10 |
