Chameleon

Chameleon Commit Details

Date:2015-03-08 15:32:29 (4 years 4 months ago)
Author:zenith432
Commit:2595
Parents: 2594
Message:Fix bug in malloc_init, use bios for enableA20()
Changes:
M/branches/zenith432/i386/boot2/boot.c
M/branches/zenith432/i386/libsaio/misc.c
M/branches/zenith432/i386/libsa/zalloc.c
M/branches/zenith432/i386/libsaio/saio_internal.h
M/branches/zenith432/i386/libsaio/biosfn.c

File differences

branches/zenith432/i386/libsaio/biosfn.c
10421042
10431043
10441044
1045
1046
1047
1048
1049
1050
1051
bios(&bb);
}
void enableA20(void)
{
bzero(&bb, sizeof bb); // Note: may be called before BSS section is initialized
bb.intno = 0x15;
bb.eax.rr = 0x2401;
bios(&bb);
}
branches/zenith432/i386/libsaio/misc.c
4646
4747
4848
49
4950
5051
5152
......
107108
108109
109110
111
110112
111113
112114
#include "libsaio.h"
#if UNUSED
/*
* keyboard controller (8042) I/O port addresses
*/
/* wait until done */
flushKeyboardInputBuffer();
}
#endif /* UNUSED */
//==========================================================================
// Return the platform name for this hardware.
branches/zenith432/i386/libsaio/saio_internal.h
7272
7373
7474
75
7576
7677
7778
......
137138
138139
139140
140
141141
142142
143143
extern unsigned long getExtendedMemorySize();
extern unsigned long getConventionalMemorySize();
extern void sleep(int n);
extern void enableA20(void);
/* bootstruct.c */
extern void initKernBootStruct(void);
long AllocateMemoryRange(char *rangeName, long start, long length, long type);
/* misc.c */
extern void enableA20(void);
extern int checkForSupportedHardware();
extern int isLaptop();
extern void getPlatformName(char *nameBuf);
branches/zenith432/i386/boot2/boot.c
418418
419419
420420
421
422421
423422
423
424424
425425
426426
// own things, and then calls common_boot.
void boot(int biosdev)
{
initialize_runtime();
// Enable A20 gate before accessing memory above 1Mb.
enableA20();
initialize_runtime();
common_boot(biosdev);
}
branches/zenith432/i386/libsa/zalloc.c
7575
7676
7777
78
78
7979
8080
8181
zalloc_base = start ? start : (char *)ZALLOC_ADDR;
totalNodes = nodes ? nodes : ZALLOC_NODES;
zalloced = (zmem *) zalloc_base;
zavailable = (zmem *) zalloc_base + sizeof(zmem) * totalNodes;
zavailable = (zmem *) (zalloc_base + sizeof(zmem) * totalNodes);
zavailable[0].start = (char *)zavailable + sizeof(zmem) * totalNodes;
if (size == 0)

Archive Download the corresponding diff file

Revision: 2595