[v0.98][PPC] Start PowerPC port. It just compiles but nothing is displayed

This commit is contained in:
Dr-Noob
2021-07-27 20:26:17 +02:00
parent 7afb6fd0fe
commit f4aa335af1
10 changed files with 200 additions and 10 deletions

28
src/ppc/ppc.c Normal file
View File

@@ -0,0 +1,28 @@
#include <stdio.h>
#include <stdlib.h>
#include <stdlib.h>
#include <string.h>
#include "ppc.h"
#define STRING_UNKNOWN "Unknown"
struct cpuInfo* get_cpu_info() {
struct cpuInfo* cpu = malloc(sizeof(struct cpuInfo));
struct features* feat = malloc(sizeof(struct features));
cpu->feat = feat;
bool *ptr = &(feat->AES);
for(uint32_t i = 0; i < sizeof(struct features)/sizeof(bool); i++, ptr++) {
*ptr = false;
}
cpu->cpu_name = malloc(sizeof(char) * strlen(STRING_UNKNOWN) + 1);
snprintf(cpu->cpu_name, strlen(STRING_UNKNOWN) + 1, STRING_UNKNOWN);
return cpu;
}
void print_debug(struct cpuInfo* cpu) {
printf("TODO\n");
}